Avoiding connections


I’m using Liquibase only to generate DDL to text file.

Two things are annoying:

  1. The generated lock table stuff

  1. The fact that a connection is made when generation is done. 

I want a DDL based on the changelog file, nothing more.

Any way to accomplish this?


Currently not. To generate the correct SQL, liquibase needs to know the type and version of the database you are connecting to. 

You could avoid the lock table by creating an extension to modify the LockService to be no-ops. It is in there to support setups with multiple servers connecting to the same database but that doesn’t always apply to everyone.


I’d like to support this in my fork. I want to set the type and version manually without a connection - any suggestions where in the code to do this modification (if it’s well contained) ?

If you create a new class that implements liquibase.lockservice.LockService and returns a higher getPriority() method, Liquibase should use your class instead of the standard one. Just leave stub methods in your class.

If you use a package other than something like liquibase.lockservice.ext, you will need to add a "Liquibase-Package: " line to your MANIFEST.MF file. See liquibase.org/extensions for more general info on writing extensions.