# Databases not within the if/else conditions in JdbcDatabaseSnapshot need to query from table\_constraints

**URL:** <https://forum.liquibase.org/t/databases-not-within-the-if-else-conditions-in-jdbcdatabasesnapshot-need-to-query-from-table-constraints/3980>\
**Category:** Liquibase Development\
**Created:** [July 7, 2018, 9:44am UTC](https://forum.liquibase.org/t/databases-not-within-the-if-else-conditions-in-jdbcdatabasesnapshot-need-to-query-from-table-constraints/3980 "2018-07-07T09:44:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rail](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Rail](https://forum.liquibase.org/u/Rail)\
**Post date:** [July 7, 2018, 9:44am UTC](https://forum.liquibase.org/t/databases-not-within-the-if-else-conditions-in-jdbcdatabasesnapshot-need-to-query-from-table-constraints/3980/1 "2018-07-07T09:44:00Z")

</div>

There are two classes (JdbcDatabaseSnapshot.java and UniqueConstraintSnapshotGenerator.java) with a general else condition that queries for a “constraints” table for sql generation…

"select CONSTRAINT\_NAME, CONSTRAINT\_TYPE, TABLE\_NAME "

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + "from " + database.getSystemSchema() + ".constraints "

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + “where constraint\_schema=’” + jdbcSchemaName + "’ "

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + “and constraint\_catalog=’” + jdbcCatalogName + "’ "

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + “and constraint\_type=‘UNIQUE’”;

The “.constraints” should be changed to the standard “.table\_constraints” because “constraints” is a reserved keyword in other databases. This issue is unfortunate because your can not override this particular method to extend the database.

I’m using the previously development Intersystems Cache extension but still fail in generateChangeLog since this query is not allowed.&nbsp;&nbsp;

This is my first time post so I hope this is in the proper place.&nbsp; Thanks!
