/update-sql

Liquibase updateSQL command as a service

Primary LanguageJavaApache License 2.0Apache-2.0

update-sql

Liquibase updateSQL command as a service.

Description

This service is useful for projects that treat Liquibase changelog as single source of truth but deliver plain SQL files as well.
So, when developers finish updating the changelog, they can easily generate the corresponding SQL files.

The result of running this service should be equal to the CLI command below:

/path/to/liquibase-3.8.9-bin/liquibase --url=offline:<db-type> --changeLogFile=/path/to/changelog.yml updateSQL

Limitations

The service:

  • currently supports only YAML changelogs (not JSON nor XML)
  • generates SQL for MySql, MSSQL and Oracle databases
  • replaces external SQL files inclusion with -- Content placeholder (<file-name>)
  • does not support external changelogs inclusion (will result in Bad Request)

Running

Docker

docker run -d -p 8080:8080 polarfish/update-sql

JAR

mvn clean package && java -jar target/update-sql*.jar

spring-boot-maven-plugin

mvn spring-boot:run

Screenshots

image