HHH-10526 - Fix SchemaMigrator does not apply SchemaFilter on foreign keys
This commit is contained in:
parent
7ac83badf3
commit
0b9e81d35c
|
@ -301,7 +301,13 @@ public class SchemaMigratorImpl implements SchemaMigrator {
|
||||||
|
|
||||||
//NOTE : Foreign keys must be created *afterQuery* all tables of all namespaces for cross namespace fks. see HHH-10420
|
//NOTE : Foreign keys must be created *afterQuery* all tables of all namespaces for cross namespace fks. see HHH-10420
|
||||||
for ( Namespace namespace : database.getNamespaces() ) {
|
for ( Namespace namespace : database.getNamespaces() ) {
|
||||||
|
if ( !schemaFilter.includeNamespace( namespace ) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
for ( Table table : namespace.getTables() ) {
|
for ( Table table : namespace.getTables() ) {
|
||||||
|
if ( !schemaFilter.includeTable( table ) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final TableInformation tableInformation = existingDatabase.getTableInformation( table.getQualifiedTableName() );
|
final TableInformation tableInformation = existingDatabase.getTableInformation( table.getQualifiedTableName() );
|
||||||
if ( tableInformation != null && !tableInformation.isPhysicalTable() ) {
|
if ( tableInformation != null && !tableInformation.isPhysicalTable() ) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue