I use Hibernate in my day-to-day programming tasks and I find it very good. In particular I love the way it manages schema updates while developing, saving me from a lot of headaches.
Anyway they wrote on the docs that it is not recomended in production environment, understandably. So when I update an app on a production server, what can be the industry-standard way? I thought of creating an automated install procedure that dumps the database contents (a backup basically), then call hibernate schema update from code, then runs some tests on queries and so on. Anyway, are there tools around that would do this automatically and are well tested?
Speak out! :)
Thanks.
Take a look at Liquibase. It's essentially a version control system for your database schema. It nicely integrates with Hibernate, too.
Look at Strategies for dealing with constantly changing requirements for MySQL schemas? for a similar question and its answer.
To make it short, once you have a reasonable amount of data and need to migrate it from one schema to another one, you'll need to write SQL scripts to alter your schema and move/transform data.
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