Skip to content

Instantly share code, notes, and snippets.

@xd2
Last active July 12, 2019 16:29
Show Gist options
  • Save xd2/e63dd1ef2a712b8283872754cf6a82c0 to your computer and use it in GitHub Desktop.
Save xd2/e63dd1ef2a712b8283872754cf6a82c0 to your computer and use it in GitHub Desktop.

Liquibase legacy changelog

I encountered unexplainable issues (about liquibase dependancies, classpath, jar inclusion) using liquibase command line interface in my macosX terminal.
I eneded up using the intellij to run liquibase successfully.
Hereunder the command line to generate a YML changelog of an existing database running on localhost.

--driver=org.postgresql.Driver
--classpath=/Users/Xavier/.m2/repository/org/postgresql/postgresql/9.4.1212.jre7/postgresql-9.4.1212.jre7.jar
--changeLogFile=db.changelog.yml
--url="jdbc:postgresql://localhost:5432/genius"
--username=genius_bar
--password=genius_bar
generateChangeLog

Then, use the changeLogSyncSQL command to generate the reuired liquibase datatable entries to ensure that the pre-Liquibase changeSets are only ran on new, empty databases.

@xd2
Copy link
Author

xd2 commented Jul 12, 2019

Capture d’écran 2019-07-12 à 16 53 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment