HHH-16614 - Properly handling before/after tables on creation for auxiliary database objects
This commit is contained in:
parent
8408849a50
commit
b364a9d50a
|
@ -204,7 +204,7 @@ public abstract class AbstractSchemaMigrator implements SchemaMigrator {
|
||||||
|
|
||||||
// Create before-table AuxiliaryDatabaseObjects
|
// Create before-table AuxiliaryDatabaseObjects
|
||||||
for ( AuxiliaryDatabaseObject auxiliaryDatabaseObject : database.getAuxiliaryDatabaseObjects() ) {
|
for ( AuxiliaryDatabaseObject auxiliaryDatabaseObject : database.getAuxiliaryDatabaseObjects() ) {
|
||||||
if ( !auxiliaryDatabaseObject.beforeTablesOnCreation()
|
if ( auxiliaryDatabaseObject.beforeTablesOnCreation()
|
||||||
&& auxiliaryDatabaseObject.appliesToDialect( dialect ) ) {
|
&& auxiliaryDatabaseObject.appliesToDialect( dialect ) ) {
|
||||||
applySqlStrings(
|
applySqlStrings(
|
||||||
true,
|
true,
|
||||||
|
@ -275,7 +275,7 @@ public abstract class AbstractSchemaMigrator implements SchemaMigrator {
|
||||||
|
|
||||||
// Create after-table AuxiliaryDatabaseObjects
|
// Create after-table AuxiliaryDatabaseObjects
|
||||||
for ( AuxiliaryDatabaseObject auxiliaryDatabaseObject : database.getAuxiliaryDatabaseObjects() ) {
|
for ( AuxiliaryDatabaseObject auxiliaryDatabaseObject : database.getAuxiliaryDatabaseObjects() ) {
|
||||||
if ( auxiliaryDatabaseObject.beforeTablesOnCreation() && auxiliaryDatabaseObject.appliesToDialect( dialect ) ) {
|
if ( !auxiliaryDatabaseObject.beforeTablesOnCreation() && auxiliaryDatabaseObject.appliesToDialect( dialect ) ) {
|
||||||
applySqlStrings(
|
applySqlStrings(
|
||||||
true,
|
true,
|
||||||
auxiliaryExporter.getSqlCreateStrings( auxiliaryDatabaseObject, metadata, sqlGenerationContext ),
|
auxiliaryExporter.getSqlCreateStrings( auxiliaryDatabaseObject, metadata, sqlGenerationContext ),
|
||||||
|
|
Loading…
Reference in New Issue