Hello everybody, I''m a newbie in RoR. In order to create a table I''ve created a migration with the ''rails generate model...'' command. Now I would like to add a composite index over two columns of this table with another, new, migration. Is it possible? I''ve read the documentation about the add_index transformation but I can''t create the new migration from command line. I think I can edit the ''create table'' migration file, but I would like to have a different migration (generated by ''rails'' command). Thanks in advance for your help, Federico -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Apr 17, 8:19 pm, Federico <federico.rot...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello everybody, > I''m a newbie in RoR. > In order to create a table I''ve created a migration with the ''rails > generate model...'' command. > Now I would like to add a composite index over two columns of this > table with another, new, migration. > Is it possible?of course> I''ve read the documentation about the add_index transformation but I > can''t create the new migration from command line. > I think I can edit the ''create table'' migration file, but I would like > to have a different migration (generated by ''rails'' command).rails generate migration do_blah will create a new migration called do_blah Fred> > Thanks in advance for your help, > > Federico-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Just easy like that...thank you Fred! (that''s my name too btw :) ) On 17 Apr, 21:59, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Apr 17, 8:19 pm, Federico <federico.rot...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello everybody, > > I''m a newbie in RoR. > > In order to create a table I''ve created a migration with the ''rails > > generate model...'' command. > > Now I would like to add a composite index over two columns of this > > table with another, new, migration. > > Is it possible? > > of course > > > I''ve read the documentation about the add_index transformation but I > > can''t create the new migration from command line. > > I think I can edit the ''create table'' migration file, but I would like > > to have a different migration (generated by ''rails'' command). > > rails generate migration do_blah will create a new migration called > do_blah > > Fred > > > > > > > > > > > Thanks in advance for your help, > > > Federico-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.