3 ms·
This isn't so much to revert your database, but to manage your schema migrations in a similar fashion to rake db:migrate. Liquibase works well with Spring, so
by jwn 12y ago
This isn't so much to revert your database, but to manage your schema migrations in a similar fashion to rake db:migrate.
Liquibase works well with Spring, so you can have the Spring context run migrations as required without involving application code. This is a very good thing. Without this, you have to have your code up your own solution for figuring out at runtime if your database schema is in line with your Entity objects (assuming your using JPA).
- beermann 12y agoDefinitely agree. I use liquibase so that I can check database migrations into source control and have an easy way for other developers to update to the new schema without having to understand a whole lot. It also provides a nice way to drop your whole database and recreate it if you need to. In addition, much like how unit tests force you to think about how to write code, rollbacks help when writing schema migrations to make sure that something could be undone if necessary. In practice, I've rarely used them though, and if you do it's likely going to be on a dev/staging server.