Added the goal "update"
authorKai Moritz <kai@juplo.de>
Sun, 6 Nov 2016 15:15:51 +0000 (16:15 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 13 Nov 2016 16:37:15 +0000 (17:37 +0100)
commit9ef60a3f37e89f8a2417e340ef6c6b4a11e6013e
tree5eb0b544805dd4d3ccd0702fd32231538c39827d
parent2bc469097f6ff01d83f7a361d2c33e2a3fafef1c
Added the goal "update"

This new goal is not as useful, as it looks, because the quality of the
generated update-script heavily depends on the support for the JDBC metadata
API of the used driver.

As the added integration-test shows, this support is rather bad for the
H2-database, that is used in the test: a change to the length of one
column is ignored. Only the rename is reflected.

The same seems to hold for MySQL, as can be read here:
http://stackoverflow.com/a/12405147/247276
src/it/update/db/test.mv.db [new file with mode: 0644]
src/it/update/pom.xml [new file with mode: 0644]
src/it/update/src/main/java/org/hibernate/tutorial/annotations/Event.java [new file with mode: 0644]
src/it/update/src/main/resources/hibernate.cfg.xml [new file with mode: 0644]
src/it/update/update.sql [new file with mode: 0644]
src/it/update/verify.bsh [new file with mode: 0644]
src/main/java/de/juplo/plugins/hibernate/UpdateMojo.java [new file with mode: 0644]