Can a 'dry run' process preconditions?

Hi

I’m testing a maven implementation using the update method. Ideally I wanted to have a sense-check on the updates, but ‘dry run’ (with Writer) doesn’t seem to execute the preConditions sqlCheck.

This means it gives a false impression of the sql to execute, because it appears to include all the SQL that could well fail pre-conditions (and thus not run).

Is there something I’m not doing correctly, or is this just a limitation of Liquibase?

Thanks

Hi @cjj ,

Sorry you are having issue, let me see if I can help. May I get some clarification? Exactly what command are you trying to run? I can’t speak to Maven or how maven will act, but on this liquibase forum, there are some maven experts.

Please reply back with answers to the following:

  • Is there a liquibase command you are running?
  • If the command relies on a liquibase.properties file please include that as well.
  • What do you mean by ‘dry run’, are you speaking of updateSQL? (again, if you provide exact command being ran, that should clarify better).

The whole idea behind a sqlcheck is to return row counts. You don’t need liquibase to do that, you can just run that bit of sql yourself locally before the updateSQL (again what I am assuming you are calling a dry run). The updateSQL command returns the rendered sql of all the changesets, and the preconditions sqlCheck you can run on your own.

If you would like to change the functionality of updateSQL, you can submit a request as an issue or if skilled enough, write a PR to propose that change. There’s also guidance and help from other developers on our discord #developer channel.