I have a java ee project with a existing db-schema. Now I want to use liquibase for the db.
So I generated a changelog from my existing schema at the command line. Run that changelog against the existing database with mvn liquibase:changeLogSync and now I can work with liquibase without problems.
My question is: can I use the changeLogSync command within the project without executing it manuell? F.e. like I use new files with changesets:
<include file="changelogs/db.changelog1.xml"/>
Is there a similar way for changeLogSync, like this one in Ant:
<changeLogSync
changeLogFile="${db.changelog.file}"
driver="${database.driver}"
url="${database.url}"
username="${database.username}"
password="${database.password}"
classpathref="classpath"
>
</changeLogSync>
Sure. Here’s ours:
Adjust of course for your own DB flavor and build phase preferences.