Reputation: 10350
We need to modify (such as add/remove table, add/remove/change column in current table) the mysql production database with the progress of development of the rails 3.1 app. What's the best way to do that? There is valuable data in production database and they should be retained after the modification.
Thanks.
Upvotes: 0
Views: 408
Reputation: 362
The only way I believe if i understand your question is - to keep your data and schema copy handy and maintain them using some standard naming convention like dd-mm-yy-timestamp. this will allow you to take hot backup/cold backup. while in rails you can play with migrations to and from. but not keep data as well. if the data is a seed data then it can be returned and reversed.
The solution is other hand is more handy.you can write cron jobs and call shell scripts to make sure your operation is not manual and keeps the backup copy at safe location.
Upvotes: 1
Reputation: 1317
Not sure what you have tried but Rails Database Migrations is what you are looking for.
Upvotes: 1