HHH-10203 - Overriden UniqueDelegate.getTableCreationUniqueConstraintsFragment not called anymore in SchemaExport
This commit is contained in:
parent
4218f365e5
commit
eadb0fec8f
|
@ -135,6 +135,8 @@ public class StandardTableExporter implements Exporter<Table> {
|
|||
.append( table.getPrimaryKey().sqlConstraintString( dialect ) );
|
||||
}
|
||||
|
||||
buf.append( dialect.getUniqueDelegate().getTableCreationUniqueConstraintsFragment( table ) );
|
||||
|
||||
applyTableCheck( table, buf );
|
||||
|
||||
buf.append( ')' );
|
||||
|
|
|
@ -72,7 +72,7 @@ public class UniqueDelegateTest extends BaseUnitTestCase {
|
|||
|
||||
assertThat( getAlterTableToAddUniqueKeyCommandCallCount, equalTo( 1 ) );
|
||||
assertThat( getColumnDefinitionUniquenessFragmentCallCount, equalTo( 1 ) );
|
||||
assertThat( getTableCreationUniqueConstraintsFragmentCallCount, equalTo( 0 ) );
|
||||
assertThat( getTableCreationUniqueConstraintsFragmentCallCount, equalTo( 1 ) );
|
||||
|
||||
final SchemaDropper schemaDropper = ssr.getService( SchemaManagementTool.class ).getSchemaDropper( Collections.emptyMap() );
|
||||
schemaDropper.doDrop( metadata, false, target );
|
||||
|
@ -80,7 +80,7 @@ public class UniqueDelegateTest extends BaseUnitTestCase {
|
|||
// unique keys are not dropped explicitly
|
||||
assertThat( getAlterTableToAddUniqueKeyCommandCallCount, equalTo( 1 ) );
|
||||
assertThat( getColumnDefinitionUniquenessFragmentCallCount, equalTo( 1 ) );
|
||||
assertThat( getTableCreationUniqueConstraintsFragmentCallCount, equalTo( 0 ) );
|
||||
assertThat( getTableCreationUniqueConstraintsFragmentCallCount, equalTo( 1 ) );
|
||||
}
|
||||
|
||||
public static class MyDialect extends H2Dialect {
|
||||
|
|
Loading…
Reference in New Issue