I have always scripted all DB changes. But I'm wondering if I really need to do that with Grails applications, since GORM will make the changes automatically.
So what's the best practice for managing database changes in a Grails application?
This is the pattern that I've used on several large Grails projects (and some smaller ones):
I wouldn't use straight GORM in production unless it is a smaller project that can handle a few possible speed bumps and manual interventions.
Once you start managing several environments (local development, QA/UAT, Staging, Production) you be glad that you spent the time to manage your DB changes.
Liquibase and Autobase both give you some good tools for writing many of the common refactorings, but you can always drop down into raw SQL if you want/need to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With