#299 "if exists" when dropping a constraint

open
nobody
None
5
2014-01-28
2014-01-28
Audrien Fontaine
No

Hibernate 4.2 changed the ways it generate schema: it will try to delete table and constraint on a empty database. It uses delete table if exists but cannot uses delete constraint if exist as this functionality isn't implemented in HSQLDB.

It would be nice for HSQLDB to support "if exists" when dropping a constraint.

https://hibernate.atlassian.net/browse/HHH-7002
https://hibernate.atlassian.net/browse/HHH-8331

Discussion

  • Fred Toussi
    Fred Toussi
    2014-01-28

    I read the links and your github entry. What is wrong with THIS

    DROP TABLE IF EXISTS MYTABLE CASCADE

    Does Hibernate need to drop just the constraint, instead of the table?