This is the template I used for several major Grails projects (and some smaller ones):
- At GORM, we trust ™ for the first stages of development (pre-training / no data)
- Before releasing the production environment, he will start using a tool such as Autobase , Liquibase , Database migration tasks (similar to RoR rake) or another version control utility.
- Maintain all database changes through a tool in an automated mod.
- Test your migrations by writing tests that run corner cases and data integrity to a level that you are more comfortable with on production data.
I would not use the direct GORM in production, if it is not a smaller project that can handle several possible speed hits and manual interventions.
As soon as you start managing several environments (local development, QA / UAT, Staging, Production), you will be glad that you took the time to manage changes to the database.
Liquibase and Autobase give you good writing tools for many common refactoring, but you can always give up raw SQL if you want / need.
source share