- Download liquibase archive file
- Extract it
- Create liquibase.properties file like below and put it in
LIQUIBASE_HOME
driver=com.mysql.cj.jdbc.Driver
url=jdbc:mysql://localhost:3320/test
username=<user>
password=<pass>
changeLogFile=changelog-test.xml
classpath=/tmp/lb/mysql-connector-java-8.0.18.jar
# Have this here if you want to have changelog generated for data as well
diffTypes=data
-
Run commands like this, from
LIQUIBASE_HOME
./liquibase generateChangeLog
-
To apply changelog
./liquibase update
################
Some hand commands. At times, because of certain reasons, you might face checksum change errors. https://stackoverflow.com/questions/9995747/liquibase-checksum-validation-error-without-any-changes (something like this).
In this case clearCheckSums
the liquibase command to go for.
At times, you actually want to ignore certain changelogs - because some fool - did make changes to db outside the version control and now you don't have preconditions to apply the change - another mistake that fool that! (or vice versa). Then to temporarily unblock yourself, you can use markNextChangeSetRan
command.