There is a requirement about a user interface to provide options to upgrade database change if there is new service pack for current Spring web application(with OpenJPA).
Seems LiquiBase is a good option. But I haven’t found any articles or document about LiquiBase API that can detect new schema change(either from database or change log). It looks like LiquiBase is more a “silence upgrade” option on development level, so each time developer can create new change log and let Maven to auto upgrade database schema.
But is there any option we can provide front end user to click a button to upgrade the schema by their choice, then show user error when it fails and roll back? In general is there some Java API can wrap with Spring framework?
Thanks in advance.
I have to say a really hated Liquibase mainly because I just for some reason could not get it to work.
You might want to give this a try:
http://flywaydb.org/
Otherwise (since it sounds like your shipping a product) you can create two installs: one of the old version and one of the new version.
Do a schema dump for each install and then diff them. Create an up and down sql script based on the diffs.