Drop constraints using CASCADE
Co-Authored-By: William Cekan <wcekan@oath.com>
This commit is contained in:
parent
b35ccc8e37
commit
b5443deab3
|
@ -259,11 +259,6 @@ public class H2Dialect extends Dialect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean supportsIfExistsAfterTableName() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsIfExistsBeforeConstraintName() {
|
public boolean supportsIfExistsBeforeConstraintName() {
|
||||||
return true;
|
return true;
|
||||||
|
@ -434,8 +429,25 @@ public class H2Dialect extends Dialect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not drop constraints explicitly, just do this by cascading instead.
|
||||||
@Override
|
@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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue