Comparing changelogs without provisioning a database

Hello,

I would like to be compare two changelogs without having to load them into a database. I am managing the domain logical model with a proprietary DSL and I can easily generate the liquibase change log.

Optimally, I would like to generate complete changelogs (the complete model not changes between two versions) for different version of my logical model and then use liquibase to get the diff and thus generate the DDL for the diff between the two versions out of it.

I could deploy the two versions in a database and compare but I do not have an easy access to an extra schema or a database.

Is there an option to do an offline changelog diff?

Thanks a lot in advance

Best Regards

Hello Steve,
If understood You correctly, maybe the liquibase snapshot command is what You’re looklng for?
https://docs.liquibase.com/commands/community/snapshot.html

Thanks a lot for the answer. Actually snapshot is what I am looking for but “offline”. So optimally “offline” snapshot. Is that possible?

Another question: can I compare snapshots from 2 different dbms (say oracle and postgresql) ?

Thanks

Check the docs from my previous posts. There are some examples witrh offline snapshots, and comparing mysql with oracle.

Thanks a lot and indeed we can compare mysql with oracle and that’s great but if my understanding is current in the documentation the snapshots are obtained from a running db not from an offline changelog.

I will try to generate the snapshot from an H2 in memory

so using h2 does not work to build a diff between snapshots as the diff detects different implementation of data types as difference (BOOL H2 vs BOOLEAN PostgresQL). So that is not practical way to create the difference between an existing database in v 1.0 and a changelog that contains all the entities of v1.1