I''ve made some pretty major changes to my applications structure, including regenerating the migrations. Rather than adding a column here and there I just did this... rake db:migrate VERSION=0 Then edited my migration files with the new column names and types I required (only a couple of tables affected), I''ve then done... rake db:migrate and that''s brought in all the changes, it blatted all the data of course but the schema is now where I want it. So what I''ve described above is all on my mac locally (the dev site). So the thing is, what can I now do in production to preserve all the data? Any tips for me? -- 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 2 Sep 2008, at 15:00, bingo bob wrote:> > I''ve made some pretty major changes to my applications structure, > including regenerating the migrations. Rather than adding a column > here > and there I just did this... > > rake db:migrate VERSION=0 > > Then edited my migration files with the new column names and types I > required (only a couple of tables affected), I''ve then done... > > rake db:migrate > > and that''s brought in all the changes, it blatted all the data of > course > but the schema is now where I want it. > > So what I''ve described above is all on my mac locally (the dev site). > > So the thing is, what can I now do in production to preserve all the > data?instead of doing what you did, create migrations that add, remove or change columns/tables as required. 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I thought I might get that answer! Being that I''ve done it though, any tips? -- 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 2 Sep 2008, at 15:47, bingo bob wrote:> > > I thought I might get that answer! > Being that I''ve done it though, any tips?Revert the changes :-) 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
OK, thanks, well not an option to revert, gone too far. Thing is I have various tables in production, some of which (most) are easy to recreate if I blow the data out. Question is, there are some tables blog entries and page contents that I''d like to preserve the data for, I haven''t touched the migrations for these. Can I do this? bb. -- 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 3 Sep 2008, at 17:10, bingo bob wrote:> > > OK, thanks, well not an option to revert, gone too far. > > Thing is I have various tables in production, some of which (most) are > easy to recreate if I blow the data out. Question is, there are some > tables blog entries and page contents that I''d like to preserve the > data > for, I haven''t touched the migrations for these. >You can probably hack around to only run down/up on some migrations. don''t know if there''s anything builtin for that.> Can I do this? > > bb. > -- > 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 -~----------~----~----~----~------~----~------~--~---
> You can probably hack around to only run down/up on some migrations. > don''t know if there''s anything builtin for that.That''s what I figured might be possible, any clues as to how to do this being as I''ve got 16 migration files in development, under svn control? -- 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 -~----------~----~----~----~------~----~------~--~---