search for: auto_incremented

Displaying 20 results from an estimated 311 matches for "auto_incremented".

Did you mean: auto_increment
2006 Jul 10
2
use auto_increment before data is stored
Hello, I have 2 models (category with id(auto_increment), name and item with id(auto_increment), category_id, name). But I want to store the data with only one form that creates a new category and the corresponding items at the same time. My problem is now that I don''t know how to tell Ruby to fetch the auto_increment id of the category table and then use it for the category_id of the
2006 Mar 01
2
Oracle auto_increment ??? & Rails
To make a new istance of an Oracle table with Rails, i need that this table had a column named ''id''. This ''id'' must be Primary Key & auto_increment;. How Can I modify the ''id'' properties to do it Auto_increment in Oracle? -- Posted via http://www.ruby-forum.com/.
2010 Dec 14
4
Change primary_key column name
Hi, after changing a primary key column name, the auto-increment information (MySQL) and sequence (Oracle) are lost. What is the correct way to rename primary keys? Thanks, Gustavo -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 May 17
10
HABTM << producing incorrect insert sql ?
Greetings railsers - I''m trying to add to a collection through HABTM, but the sql insert is trying to insert a PK rather than letting mysql produce the auto_increment''ed PK. ## @medication_dose holds a validated, saved model @medication_dose.medication_frequencies << MedicationFrequency.find (:all) The above bails with, Mysql::Error: #23000Duplicate
2006 May 21
2
MySQL-Front question
I''ve been going through the tutorial here: http://instantrails.rubyforge.org/tutorial/index.html About a third of the way down, right under figure 23 there''s a section on ''Adding Recipe Fields''. I just completed creating a recipes table and the Primary Index and auto_incrementing id have been made. The thing that''s baffling me, is that my results are
2006 Mar 21
3
Newbie - ActiveRecord relationships
So I''ve worked through Agile Web Development with Rails and I''m now trying my first little app to get into the swing of things. Its a task tracking app where people can create tasks and assign them to others, and also log time against the tasks. I''m having trouble working out the model relationships. This is what I''ve got so far, but its not right as
2006 Jan 23
4
won''t auto_increment
I am writing my first RoR ap and am having problems with ActiveRecord''s basic functions. The first one is that the id column is not auto incrementing. I can add one record but after that it says, "Mysql::Error: #23000Duplicate entry ''0'' for key 1"... b -- Posted via http://www.ruby-forum.com/.
2009 Apr 11
0
migration oracle auto_increment
I have a schema for ~15 tables in MySQL. I need to migrate it to Oracle though I''ve never used Oracle before. I see that Oracle doesn''t have an auto_increment built in. One must create a trigger table for each auto_incrementing id. I''m contemplating translating my MySQL schema into a Ruby migration script. Do you know if Ruby migrations will generate enough SQL to
2005 Dec 23
4
OO model style: inheritance
Hi everybody I am totally new to rails and I am trying to start a tiny project to get familiar with rails. But I already got my first problem and I would be happy if somebody could point me in the best and cleanest direction. I am trying to develop a small gallery app. Since I would like to add more features in future I am trying to design a clean OO architecture of my models: The base object
2006 Mar 09
4
habtm questions
I''ve got some of this working but other parts are ellusive. I have CREATE TABLE `bags` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '''', PRIMARY KEY (`id`) CREATE TABLE `packages` ( `id` int(255) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '''', PRIMARY KEY (`id`) CREATE TABLE
2006 Aug 13
0
Custom id field auto_increment increment and offset?
Hi all, in mysql, you can set the following environment variables: set @@auto_increment_offset = 4; set @@auto_increment_increment =10; such that: create table people (id int auto_increment primary key, name char(100)); insert into people set name=''Giuseppe''; insert into people set name=''Laura''; select * from people; +----+----------+ | id | name |
2006 Jun 04
0
auto_increment disappearing
Is anyone else experiencing this? My MySQL tables seem to randomly lose their auto_increment attribute on the id field... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060604/eebfd479/attachment.html
2006 Mar 15
10
Scaffold with Foreign Key
I have two tables: ------------------------------ drop table if exists users; create table users ( id int not null auto_increment, username varchar(100) not null, password varchar(20) not null, firstname varchar(20) not null, lastname varchar(20) not null, primary key (id) ) TYPE = InnoDB; ------------------------------ drop table
2012 Jan 09
2
create table in mysql using asterisk
Hi, I try to create a new table using MYSQL command in asterisk. This is what i write: Query resultid ${connid} CREATE TABLE IF NOT EXISTS "conference_600" ("id" int(11) NOT NULL auto_increment, "channel_id" varchar(40), "number_in_line" int(2), PRIMARY KEY("id")") and this is the warning that i get in the cli: app_addon_sql_mysql.c:383
2006 Jun 27
1
Help me, I stuck ..
I have three tables and is not allowed to change data scheme: CREATE TABLE `applicants` ( `id` int(10) unsigned NOT NULL auto_increment, `fullname` varchar(60) NOT NULL default '''', `address` varchar(60) NOT NULL default '''', PRIMARY KEY (`id`) ) ; CREATE TABLE `positions` ( `id` int(10) unsigned NOT NULL auto_increment, `position_name` varchar(30)
2006 Aug 02
2
many-to-one relationship, do I need a second table?
Ok, to keep things short. Im wondering if I need a secondary relationship table to handle my many-to-one relationships. Here is an example of what I''ve written down. For instance say I want to find all of the people in a given location. class Location < AR:Base has_many :people end class Person < AR:Base belongs_to :location end My SQL tables look like: CREATE TABLE
2006 Jul 13
5
Relationships: one model referencing same table for different data sets?
Hi, After I''ve saved, I want to display the Description from the Codes table that corresponds with the ID in the Cause table. Rails doesn''t seem to like that, because on my form, I have two sets of data in combo boxes that come from the Codes table. So, in the show template, I can''t do this: Cause of Death: <%= @cause.code.description %> Any ideas? The
2005 Dec 19
2
Difficulty using correct moldel for the data in DB
Hi everyone, I''ve tried posting the same question to the list last Friday but somehow did not see it being posted.. I''ve just started with Rails and Ruby. I just started to play one of those RPG and to get my feet wet I''m writing an app to keep track of item fusions. So the scoop is that item can be fused with another items to create a higher level item. The higher
2010 May 01
1
I need some help joining data from 3 MySQL tables, please
Hi all, I am trying to display collective data from 3 MySQL tables: The query I have, so far, is SELECT c . * , COUNT( m.id ) AS `members` FROM `jos_mls_teams` AS `c` LEFT JOIN `jos_mls_teams_members` AS `m` ON m.teamid = c.id RIGHT JOIN ( SELECT u.name, u.lastvisitDate FROM `jos_users` AS `u` ) ON u.id = m.userid GROUP BY c.id LIMIT 0 , 30 But get the following error: #1248 - Every derived
2007 Aug 05
0
Newbie - Question on Parent child updating
All, I''ve just started Rails and Ruby a week or so ago. Please forgive me for my ignorance. I started writing a small test application to test some of my new knowledge and have hit a wall. Would like some best practices. I have 3 tables, as below... CREATE TABLE `carts` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `quantity` int(11) NOT NULL, PRIMARY