Drop constraints using CASCADE

Co-Authored-By: William Cekan <wcekan@oath.com>
This commit is contained in:
romainmoreau 2020-02-08 16:17:42 +01:00 committed by Steve Ebersole
parent b35ccc8e37
commit b5443deab3
1 changed files with 18 additions and 6 deletions

View File

@ -259,11 +259,6 @@ public class H2Dialect extends Dialect {
return false;
}
@Override
public boolean supportsIfExistsAfterTableName() {
return true;
}
@Override
public boolean supportsIfExistsBeforeConstraintName() {
return true;
@ -434,8 +429,25 @@ public class H2Dialect extends Dialect {
return false;
}
// Do not drop constraints explicitly, just do this by cascading instead.
@Override
public boolean supportsIfExistsAfterAlterTable() {
public boolean dropConstraints() {
return false;
}
@Override
public String getCascadeConstraintsString() {
return " CASCADE ";
}
// CASCADE has to be AFTER IF EXISTS in case it's after the tablename
@Override
public boolean supportsIfExistsAfterTableName() {
return false;
}
@Override
public boolean supportsIfExistsBeforeTableName() {
return true;
}