I’ve got a set of database scripts generated by DBGhost for an MS SQL database. My requirement for now is to automate our builds via liquibase and its maven plugin using these files with little or no change to the current scripts.
After some fits with file encoding, I’ve now got all of the DDL scripts working using changeSet with sqlFile without having to modify any of the files. GREAT!
But, I’m struggling when it comes to loading up the static data scripted via DBGhost. These DBGhost “Static Data” scripts handle identity columns, add error handling, transactions, and some other various bits like rebuilding indices, etc. Unfortunately, the transactions in these scripts are interfering with liquibase in a way I don’t quite understand.
If I leave runInTransaction=“true” (the default), then running mvn liquibase:update results in the following build error:
<blockquote class=“webkit-indent-blockquote” of these scripts if/when they are re-generated by DBGhost. I also realize that DBGhost does provide products that perform some similar functions to liquibase but our team prefers cross-platform, OSS so we chosen to eschew further licensing of DBGhost.