I have already created a migration. It adds 5 columns. Now I edit migration file and enter 2 more column. How can I remigrate so that 2 new columns would be added without loosing data with db:migrate:reset? -- 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 -~----------~----~----~----~------~----~------~--~---
On Jul 4, 8:36 am, "Vapor .." <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I have already created a migration. It adds 5 columns. Now I edit > migration file and enter 2 more column. > > How can I remigrate so that 2 new columns would be added without loosing > data with db:migrate:reset?You can''t (short of dumping the data first and loading it in afterwards or something like that). You''d be better off adding a second migration that adds the extra columns. Fred --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
We have a policy of never ever editing migrrations, if you do, they become useless... On Jul 4, 9:02 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jul 4, 8:36 am, "Vapor .." <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > I have already created a migration. It adds 5 columns. Now I edit > > migration file and enter 2 more column. > > > How can I remigrate so that 2 new columns would be added without loosing > > data with db:migrate:reset? > > You can''t (short of dumping the data first and loading it in > afterwards or something like that). You''d be better off adding a > second migration that adds the extra columns. > > Fred--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---