One SQL-update-script for changelog for any DB state?


I am currently researching a solution to the problem of deploying a database schema to multiple different databases (Oracle, MSSQL, …) and found Liquibase, seemingly doing exactly that. Wonderful!
My problem is that most of the time I won’t be allowed to update via Liquibase directly, but with plain SQL only.
I already found updateSql and the offline url function and was able to generate code for different systems but this code is still dependent on the state of the database, has to be generated as such and cannot be executed regardless of the version the database I deploy to has.
So I wondered if there is a way to generate plain old SQL in one update file including all changesets which just won’t be executed depending on the DATABASECHANGELOG table of the DB I deploy to as if Liquibase would do it itself?

Many thanks and with best regards


Hello @mrei, I haven’t used plain SQL to deploy on Liquibase yet, but I found this documentation that might be helpful for you, please have a look I hope it helps.

Hi @raul.balestra and thank you for your reply.
Sadly this documentation seems to be about “deploying pre-written plain SQL with Liquibase”, not “deploying changes in Liquibase-generated plain SQL”.