I'm using the dbdeploy maven plugin but it's throwing an error when I run a build. The error says :
[ERROR] com.dbdeploy.exceptions.SchemaVersionTrackingException: Could not retrieve change log from database because: user lacks privilege or object not found: CHANGELOG
This is because the CHANGELOG table that dbdeploy uses has not been created. I can see how it is done using the ant build script that comes with the examples, but I can't figure out how to get it done with the maven plugin (I don't want to run an ant task under maven, that defeats the point of the dbdeploy-maven-plugin).
Any ideas?
Having trawled through the dbdeploy source and the dbdeploy maven plugin source I can't see anywhere that the changelog is being created. The example that comes bundled with the code does not work, I get the impression that it is a half finished and poorly tested effort.
I manually create the changelog table and things worked after that, but that is a poor solution.
Thankfully, though too late for me, I eventually discovered someone else who had the same problem, their solution is here. In short, they run the script for creating the changelog by invoking the maven sql plugin.
None of this is documented in the dbdeploy site, I'll probably look at alternatives given that this all feels a bit flakey.