Generating migrations from Rails schema updates, not vice versa

I hate writing migrations, but it's important that the schemas stay in sync. I'd rather update my schema.rb

and get notified by Rails, and then run something that creates an appropriate migration based on the difference between the old version and the current version.

Is there a way I can do this?

+1


a source to share


1 answer


This plugin has appeared on Google Googling: http://errtheblog.com/posts/65-automatically

It doesn't actually create migrations for you. But it looks like this is basically what you are looking for.



Edit: here is the final link to the plugin code: http://github.com/pjhyett/auto_migrations/

0


a source







All Articles