File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Xtensive.Orm.Tests.Sql/PostgreSql
Xtensive.Orm.Tests/Storage Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ protected override string GetIndexExtractionPrepareScript(string tableName)
101101 $ "CREATE TABLE \" { tableName } \" (\" column1\" int, \" column2\" int);" +
102102 $ "\n CREATE INDEX \" { tableName } _index1_desc_asc\" on \" { tableName } \" (\" column1\" desc, \" column2\" asc);" +
103103 $ "\n CREATE UNIQUE INDEX \" { tableName } _index1_u_asc_desc\" on \" { tableName } \" (\" column1\" asc, \" column2\" desc);" +
104- $ "\n CREATE UNIQUE INDEX \" { tableName } _index_with_included_columns\" on \" { tableName } \" (\" column1\" asc) include \" column2\" );";
104+ $ "\n CREATE UNIQUE INDEX \" { tableName } _index_with_included_columns\" on \" { tableName } \" (\" column1\" asc) include ( \" column2\" );";
105105 }
106106 else {
107107 return
Original file line number Diff line number Diff line change @@ -344,6 +344,7 @@ public class IgnoreRulesValidateTest
344344
345345 private readonly bool createConstraintsWithTable = StorageProviderInfo . Instance . Provider == StorageProvider . Sqlite ;
346346 private readonly bool noExceptionOnIndexKeyColumnDrop = StorageProviderInfo . Instance . Provider . In ( StorageProvider . PostgreSql , StorageProvider . MySql ) ;
347+ private readonly bool noExceptionOnIndexIncludedColumnDrop = StorageProviderInfo . Instance . Provider . In ( StorageProvider . PostgreSql ) ;
347348 private readonly SqlDriver sqlDriver = TestSqlDriver . Create ( GetConnectionInfo ( ) ) ;
348349
349350 private Key changedOrderKey ;
@@ -646,8 +647,13 @@ public void DropIncludedColumnOfIgnoredIndexTest()
646647 var ignoreRuleCollection = new IgnoreRuleCollection ( ) ;
647648 _ = ignoreRuleCollection . IgnoreIndex ( "IX_Ignored_Index" ) . WhenTable ( "MyEntity2" ) ;
648649
649- _ = Assert . Throws < StorageException > (
650- ( ) => BuildDomain ( DomainUpgradeMode . Perform , ignoreRuleCollection , model5Types ) . Dispose ( ) ) ;
650+ if ( noExceptionOnIndexIncludedColumnDrop ) {
651+ BuildDomain ( DomainUpgradeMode . Perform , ignoreRuleCollection , model6Types ) . Dispose ( ) ;
652+ }
653+ else {
654+ _ = Assert . Throws < StorageException > (
655+ ( ) => BuildDomain ( DomainUpgradeMode . Perform , ignoreRuleCollection , model5Types ) . Dispose ( ) ) ;
656+ }
651657 }
652658
653659 [ Test ]
You can’t perform that action at this time.
0 commit comments