@@ -371,13 +371,13 @@ public void IgnoreReferencedTableTest()
371371 if ( createConstraintsWithTable ) {
372372 var delayedOp = CreateTableDelayed ( catalog , schema , "MyIgnoredEntity" , addedColumnsNames , addedColumnsTypes ) ;
373373 CreatePrimaryKeyLocally ( catalog , schema , "MyIgnoredEntity" , "Id" , "PK_MyIgnoredEntity_Id" ) ;
374- CreateForeignKeyLocally ( catalog , schema , "MyIgnoredEntity" , "MyEntity2Id" , "MyEntity2" , "Id" , "FK_MyIgnoredEntity_MyEntity2_Id " ) ;
374+ CreateForeignKeyLocally ( catalog , schema , "MyIgnoredEntity" , "MyEntity2Id" , "MyEntity2" , "Id" , "FK_MyIgnoredEntityMyEntity2Id " ) ;
375375 delayedOp ( ) ;
376376 }
377377 else {
378378 CreateTable ( catalog , schema , "MyIgnoredEntity" , addedColumnsNames , addedColumnsTypes ) ;
379379 CreatePrimaryKeyInDb ( catalog , schema , "MyIgnoredEntity" , "Id" , "PK_MyIgnoredEntity_Id" ) ;
380- CreateForeignKeyInDb ( catalog , schema , "MyIgnoredEntity" , "MyEntity2Id" , "MyEntity2" , "Id" , "FK_MyIgnoredEntity_MyEntity2_Id " ) ;
380+ CreateForeignKeyInDb ( catalog , schema , "MyIgnoredEntity" , "MyEntity2Id" , "MyEntity2" , "Id" , "FK_MyIgnoredEntityMyEntity2Id " ) ;
381381 }
382382
383383 var ignoreRules = new IgnoreRuleCollection ( ) ;
@@ -608,7 +608,7 @@ public void UpgradeDomainWithIgnoreRuleByMaskInPerformSafelyModeTest()
608608 [ Test ]
609609 public void MultischemaValidateTest ( )
610610 {
611- Require . AllFeaturesSupported ( ProviderFeatures . Multischema | ProviderFeatures . Multidatabase ) ;
611+ Require . AllFeaturesSupported ( ProviderFeatures . Multischema ) ;
612612
613613 SetMultischema ( ) ;
614614
@@ -620,13 +620,13 @@ public void MultischemaValidateTest()
620620
621621 catalog = GetCatalog ( ) ;
622622 CreateColumn ( catalog , Schema2 , "MyEntity2" , "ReferencedIgnoredColumn" , GetTypeForInteger ( SqlType . Int64 ) ) ;
623- CreateForeignKeyInDb ( catalog , Schema2 , "MyEntity2" , "ReferencedIgnoredColumn" , "MyEntity1" , "Id" , "FK_MyEntity2_MyEntity1_MyEntity1ID " ) ;
623+ CreateForeignKeyInDb ( catalog , Schema2 , "MyEntity2" , "ReferencedIgnoredColumn" , "MyEntity1" , "Id" , "FK_MyEnt2MyEnt1MyEnt1Id " ) ;
624624
625625 var addedColumnsNames = new [ ] { "Id" , "FirstColumn" , "MyEntity2Id" } ;
626626 var addedColumnsTypes = new [ ] { GetTypeForInteger ( SqlType . Int32 ) , GetTypeForInteger ( SqlType . Int64 ) , GetTypeForInteger ( SqlType . Int64 ) } ;
627627 CreateTable ( catalog , Schema2 , "MyIgnoredEntity" , addedColumnsNames , addedColumnsTypes ) ;
628628 CreatePrimaryKeyInDb ( catalog , Schema2 , "MyIgnoredEntity" , "Id" , "PK_MyIgnoreTable_Id" ) ;
629- CreateForeignKeyInDb ( catalog , Schema2 , "MyIgnoredEntity" , "MyEntity2Id" , "MyEntity2" , "Id" , "FK_MyIgnoredEntity_MyEntity2_Id " ) ;
629+ CreateForeignKeyInDb ( catalog , Schema2 , "MyIgnoredEntity" , "MyEntity2Id" , "MyEntity2" , "Id" , "FK_MyIgnoredEntityMyEntity2Id " ) ;
630630
631631 var ignoreRules = new IgnoreRuleCollection ( ) ;
632632 _ = ignoreRules . IgnoreColumn ( "ReferencedIgnoredColumn" ) . WhenSchema ( Schema2 ) ;
@@ -670,7 +670,7 @@ public void MultidatabaseValidateTest()
670670 [ Test ]
671671 public void MultischemaUpgrageInPerformModeTest ( )
672672 {
673- Require . AllFeaturesSupported ( ProviderFeatures . Multischema | ProviderFeatures . Multidatabase ) ;
673+ Require . AllFeaturesSupported ( ProviderFeatures . Multischema ) ;
674674
675675 SetMultischema ( ) ;
676676
@@ -681,13 +681,13 @@ public void MultischemaUpgrageInPerformModeTest()
681681
682682 catalog = GetCatalog ( ) ;
683683 CreateColumn ( catalog , Schema2 , "MyEntity2" , "ReferencedIgnoredColumn" , GetTypeForInteger ( SqlType . Int64 ) ) ;
684- CreateForeignKeyInDb ( catalog , Schema2 , "MyEntity2" , "ReferencedIgnoredColumn" , "MyEntity1" , "Id" , "FK_MyEntity2_MyEntity1_MyEntity1ID " ) ;
684+ CreateForeignKeyInDb ( catalog , Schema2 , "MyEntity2" , "ReferencedIgnoredColumn" , "MyEntity1" , "Id" , "FK_MyEnt2MyEnt1MyEnt1Id " ) ;
685685
686686 var addedColumnsNames = new [ ] { "Id" , "FirstColumn" , "MyEntity2Id" } ;
687687 var addedColumnsTypes = new [ ] { GetTypeForInteger ( SqlType . Int32 ) , GetTypeForInteger ( SqlType . Int64 ) , GetTypeForInteger ( SqlType . Int64 ) } ;
688688 CreateTable ( catalog , Schema2 , "MyIgnoredEntity" , addedColumnsNames , addedColumnsTypes ) ;
689689 CreatePrimaryKeyInDb ( catalog , Schema2 , "MyIgnoredEntity" , "Id" , "PK_MyIgnoreTable_Id" ) ;
690- CreateForeignKeyInDb ( catalog , Schema2 , "MyIgnoredEntity" , "MyEntity2Id" , "MyEntity2" , "Id" , "FK_MyIgnoredEntity_MyEntity2_Id " ) ;
690+ CreateForeignKeyInDb ( catalog , Schema2 , "MyIgnoredEntity" , "MyEntity2Id" , "MyEntity2" , "Id" , "FK_MyIgnoredEntityMyEntity2Id " ) ;
691691
692692 var ignoreRules = new IgnoreRuleCollection ( ) ;
693693 _ = ignoreRules . IgnoreColumn ( "ReferencedIgnoredColumn" ) . WhenSchema ( Schema2 ) ;
@@ -707,7 +707,7 @@ public void MultischemaUpgrageInPerformModeTest()
707707 [ Test ]
708708 public void MultischemaUpgrageInPerformSafelyModeTest ( )
709709 {
710- Require . AllFeaturesSupported ( ProviderFeatures . Multischema | ProviderFeatures . Multidatabase ) ;
710+ Require . AllFeaturesSupported ( ProviderFeatures . Multischema ) ;
711711
712712 SetMultischema ( ) ;
713713
@@ -718,13 +718,13 @@ public void MultischemaUpgrageInPerformSafelyModeTest()
718718
719719 catalog = GetCatalog ( ) ;
720720 CreateColumn ( catalog , Schema2 , "MyEntity2" , "ReferencedIgnoredColumn" , GetTypeForInteger ( SqlType . Int64 ) ) ;
721- CreateForeignKeyInDb ( catalog , Schema2 , "MyEntity2" , "ReferencedIgnoredColumn" , "MyEntity1" , "Id" , "FK_MyEntity2_MyEntity1_MyEntity1ID " ) ;
721+ CreateForeignKeyInDb ( catalog , Schema2 , "MyEntity2" , "ReferencedIgnoredColumn" , "MyEntity1" , "Id" , "FK_MyEnt2MyEnt1MyEnt1Id " ) ;
722722
723723 var addedColumnsNames = new [ ] { "Id" , "FirstColumn" , "MyEntity2Id" } ;
724724 var addedColumnsTypes = new [ ] { GetTypeForInteger ( SqlType . Int32 ) , GetTypeForInteger ( SqlType . Int64 ) , GetTypeForInteger ( SqlType . Int64 ) } ;
725725 CreateTable ( catalog , Schema2 , "MyIgnoredEntity" , addedColumnsNames , addedColumnsTypes ) ;
726726 CreatePrimaryKeyInDb ( catalog , Schema2 , "MyIgnoredEntity" , "Id" , "PK_MyIgnoreTable_Id" ) ;
727- CreateForeignKeyInDb ( catalog , Schema2 , "MyIgnoredEntity" , "MyEntity2Id" , "MyEntity2" , "Id" , "FK_MyIgnoredEntity_MyEntity2_Id " ) ;
727+ CreateForeignKeyInDb ( catalog , Schema2 , "MyIgnoredEntity" , "MyEntity2Id" , "MyEntity2" , "Id" , "FK_MyIgnoredEntityMyEntity2Id " ) ;
728728
729729 var ignoreRules = new IgnoreRuleCollection ( ) ;
730730 _ = ignoreRules . IgnoreColumn ( "ReferencedIgnoredColumn" ) . WhenSchema ( Schema2 ) ;
@@ -835,6 +835,7 @@ private Domain BuildComplexDomain(DomainUpgradeMode mode, IgnoreRuleCollection i
835835 foreach ( var type in secondPartTypes ) {
836836 config . MappingRules . Map ( type . Assembly , type . Namespace ) . ToSchema ( Schema2 ) ;
837837 }
838+ config . DefaultSchema = defaultSchema ;
838839 }
839840 else if ( isMultidatabaseTest ) {
840841 foreach ( var type in firstPartTypes ) {
@@ -844,11 +845,10 @@ private Domain BuildComplexDomain(DomainUpgradeMode mode, IgnoreRuleCollection i
844845 foreach ( var type in secondPartTypes ) {
845846 config . MappingRules . Map ( type . Assembly , type . Namespace ) . ToDatabase ( Multimapping . MultidatabaseTest . Database2Name ) ;
846847 }
848+ config . DefaultSchema = defaultSchema ;
849+ config . DefaultDatabase = GetConnectionInfo ( ) . ConnectionUrl . GetDatabase ( ) ;
847850 }
848851
849- config . DefaultSchema = defaultSchema ;
850- config . DefaultDatabase = GetConnectionInfo ( ) . ConnectionUrl . GetDatabase ( ) ;
851-
852852 foreach ( var type in firstPartTypes . Union ( secondPartTypes ) ) {
853853 config . Types . Register ( type . Assembly , type . Namespace ) ;
854854 }
0 commit comments