I'm modifying an existing maven2 project and I would like to create the database structure if I notice it is missing.
I sort-of know how to do this in ant, I could query the database and if the table is missing I could开发者_运维百科 execute the query.
But, maven is a different thing. I found a SQL plugin to run the script, but I don't know where or how to detect if the database structure is missing? Also where in the "goals" should I check for this?..
I would put this on the test.
Can someone point me in the right direction?
I would use a database migration tool for this, something like the dbmaintain-maven-plugin or Carbon Five db-migration-maven-plugin.
精彩评论