Hi everybody, I want to create a table using the rails migration, in which I want to disable the auto increment option option for the id field. Is there any way. I know we can avoid the id field as :id => false in migration file. But I want the id field without auto increment property. Regards, Veeraa.T -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Veera Sundaravel
2007-Aug-25 03:28 UTC
Re: id field without autoincrement option in migraion.
Veera Sundaravel wrote:> Hi everybody, > > I want to create a table using the rails migration, in which I want to > disable the auto increment option option for the id field. Is there any > way. I know we can avoid the id field as :id => false in migration file. > > But I want the id field without auto increment property. > > Regards, > Veeraa.Tany body is there................................. just i want to create a table where id dont have auto increment property using rails migration file (/db/migrate).... create_table :users do |t| t.column "id", :integer, :auto_increment => false end is it possible. Any comments are welcome. Thanks with regards, Veerasundaravel.T -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dhaval Parikh
2007-Aug-25 12:23 UTC
Re: id field without autoincrement option in migraion.
Well i think if you are using LAMR or WAMR then you can directly go to the db and choose the table for edit then u will find that under extra there will be the auto increment option just remove that and it will work hope this helps -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Veera Sundaravel
2007-Aug-27 09:08 UTC
Re: id field without autoincrement option in migraion.
Dhaval Parikh wrote:> Well i think if you are using LAMR or WAMR then you can directly go to > the db and choose the table for edit then u will find that under extra > there will be the auto increment option just remove that and it will > work > > hope this helpsSure Dhaval Parikh. I know about this by phpmyadmin or by ordinary mysql queries. But I want to do this by Rails migration file. Is it possible. Regards, Veeraa.T -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---