views:

66

answers:

1

What is the best practice for updating a project when you want to roll back a data migration with rails? delete the migration locally and then commit the whole project?

+2  A: 

You shouldn't have to delete any migrations. All migrations should be reversible. If you are 100% sure that no one else has used those migrations, you can delete them by:

svn rm db/migrate/your_migration
svn commit db/migrate

However, if what you mean by rolling back, is fixing it for those who already used that migration, the way to go is creating a new migration that reverses the troubled one.

Maximiliano Guzman