# addForeignKeyConstraint is not supported on hsqldb

**URL:** <https://forum.liquibase.org/t/addforeignkeyconstraint-is-not-supported-on-hsqldb/812>\
**Category:** General Discussion\
**Created:** [September 21, 2010, 3:45am UTC](https://forum.liquibase.org/t/addforeignkeyconstraint-is-not-supported-on-hsqldb/812 "2010-09-21T03:45:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdoyle\_2](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sdoyle\_2](https://forum.liquibase.org/u/sdoyle_2)\
**Post date:** [September 21, 2010, 3:45am UTC](https://forum.liquibase.org/t/addforeignkeyconstraint-is-not-supported-on-hsqldb/812/1 "2010-09-21T03:45:00Z")

</div>

Hi,

I’m trying to use an in memory instance of HSQLDB for some testing with spring however I am getting a bunch of the following errors:

addForeignKeyConstraint is not supported on hsqldb, classpath:db-changelog.xml::1284765412511-799::sam(generated)::(Checksum: 2:812204f30d042278e422b4e7c9d0db01)

The documentation says this is a supported operation for this database.

here is a line from the changelog

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 

It should be noted that I did generate the changelog from an Oracle db using the instructions specified here: [http://www.liquibase.org/manual/generating\_changelogs](http://www.liquibase.org/manual/generating_changelogs)

I had thought the operations between supported databases should be transparent. Is this not the case here?

Thanks

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [September 21, 2010, 3:45am UTC](https://forum.liquibase.org/t/addforeignkeyconstraint-is-not-supported-on-hsqldb/812/2 "2010-09-21T03:45:00Z")

</div>

They generally are, but there are some times that they aren’t.&nbsp; I think the problem is the deferrable and initiallyDeferred attributes.&nbsp; Oracle supports them, but HSQL does not.&nbsp; If you take them out they should run better on both.

In 2.0 we made the validation a bit smarter so it only fails if you are asking for true values for deferrable or initiallyDeferrable.

Nathan
