cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <>
Subject Re: Handling database creation and migration
Date Wed, 21 Dec 2011 23:26:16 GMT
On 22/12/11 6:04 AM, John Huss wrote:

> Liquibase looks like it would do a decent job.  I'm not sure I like the XML
> format though.

Yes, ever since Ant tried to write a scripting language in XML, this approach has been ruined
for most people.

However in this case (using it for several months now), liquibase is really nice. We support
three different database engines and used to have three sets of files for the schema updates.
Now we have one and it is much easier to look after.

We also have a unit test which runs in Jenkins nightly to apply all the database schema migrations
and then verify that the result matches the current Cayenne schema. That catches most problems
(except of course anything with constraints or indexes which Cayenne doesn't know about).

If you implement this yourself or through Cayenne, don't forget to create some sort of database
lock mechanism so that two instances of the application (eg. two war files) deployed simultaneously
in a cluster don't both try to update the database at the same time.



Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

View raw message