furfey-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Sep-07 20:24 UTC
deploying and migrations
I''ve got an app running on a remote server in production env that I''ve been deploying with capistrano. I recently added file 002 in db/ migrate. I did a cap deploy_with_migrations and it wiped out all of my data. I think this is becuase 001 was still in db/migrate, and it just overwrote everything. Are you supposed to wipe out the the previous migrations when deploying, so only the most recent is acted upon? --~--~---------~--~----~------------~-------~--~----~ 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 Sep 7, 2007, at 4:24 PM, furfey-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Are you supposed to wipe out the the previous migrations when > deploying, so only the most recent is acted upon?No -- the schema_info table should keep track of what version you''re on at the moment, so a "rake db:migrate" only runs the migrations necessary. If you were at version 1 before it should only have run migration #2. -faisal --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---