Override change log table creation

Is there a way to override the creation of the liquibase changelog table? I would like to use liquibase with Azure Synapse Analytics but it fails because the default create statement for the changelog table fails because Primary Keys are not supported. I would like to override that CREATE TABLE statement. Below is the error I am getting.
Unexpected error running Liquibase: Enforced unique constraints are not supported. To create an unenforced unique constraint you must include the NOT ENFORCED syntax as part of your statement.

Hi @ericy ,

So if I understood correctly, the question is either:

  • Suppose there is a createTable changeset, can I have a mechanism to tell Liquibase to not run this particular changeset in a given scenario and let me run other script (.sql for example) or run other changeset?

BTW, for your particular setup, you can choose to have two separate changesets:

  • 1 changeset with just creating the table (createTable)
  • 1 changeset for the PK (and for this, add a precondition (using rdbms tag maybe, or something usable for checking target env) to run only on environments that are not Azure …). addPrimaryKey | Liquibase Docs
    This setup would create just the table and things should work.

Hope this helps,

Hi @EduardUta,
The issue I am running into is that Liquibase needs to create 2 tables for managing the changelogs:

  • the change log table
  • the change log lock table
    When Liquibase creates the change log lock table it runs a CREATE TABLE query that includes a primary key constraint which is not supported in Azure Synapse Analytics. So if there was a way to override that CREATE TABLE statement for the change log lock table I would remove the primary key constraint.
    I hope this helps explain the issue I am facing.

Hi @ericy ,

It sounds like you are running into an area where 100% parity support of Azure Synapse Analytics is not supported in Liquibase. I am guessing it is just treating it as MSSQL, since I think I read somewhere you are using the mssql jdbc driver?

If so, could you write up a defect and steps to reproduce in our issue tracker?