rails_refactor
rails_refactor copied to clipboard
Should not change migrations
trafficstars
Migrations which have been committed and deployed should be effectively immutable. Rather than editing past migrations, it would be better to create a new migration which renames the table. As is, renaming a model cannot be used in a production system.
Thanks for the suggestion, it sounds like a highly useful improvement. Would you be interested in writing a (small) PR for it? I'd suggest making it an option based on a command line switch, as there are times when you'd want to rename directly and others where you'd want a migration.