# Override change log table creation

**URL:** <https://forum.liquibase.org/t/override-change-log-table-creation/5112>\
**Category:** General Discussion\
**Created:** [February 23, 2021, 7:12pm UTC](https://forum.liquibase.org/t/override-change-log-table-creation/5112 "2021-02-23T19:12:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericy](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@ericy](https://forum.liquibase.org/u/ericy)\
**Post date:** [February 23, 2021, 7:12pm UTC](https://forum.liquibase.org/t/override-change-log-table-creation/5112/1 "2021-02-23T19:12:39Z")

</div>

Hi,  
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.

---

<div class="post-metadata">

**Author:** ![EduardUta](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/eduarduta/32/324_2.png) [@EduardUta](https://forum.liquibase.org/u/EduardUta)\
**Post date:** [February 24, 2021, 10:32am UTC](https://forum.liquibase.org/t/override-change-log-table-creation/5112/2 "2021-02-24T10:32:39Z")

</div>

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](https://docs.liquibase.com/change-types/community/add-primary-key.html)  
This setup would create just the table and things should work.

Hope this helps,  
Eduard

---

<div class="post-metadata">

**Author:** ![ericy](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@ericy](https://forum.liquibase.org/u/ericy)\
**Post date:** [February 24, 2021, 2:00pm UTC](https://forum.liquibase.org/t/override-change-log-table-creation/5112/3 "2021-02-24T14:00:51Z")

</div>

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.  
Thanks  
ericy

---

<div class="post-metadata">

**Author:** ![ronak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/ronak/32/221_2.png) [@ronak](https://forum.liquibase.org/u/ronak)\
**Post date:** [February 25, 2021, 4:34am UTC](https://forum.liquibase.org/t/override-change-log-table-creation/5112/4 "2021-02-25T04:34:10Z")

</div>

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](https://github.com/liquibase/liquibase/issues)?

Thanks,

Ronak
