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?

On Sep 7, 2007, at 4:24 PM, [email protected] 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs