@@ -64,7 +64,7 @@ public class Book : Entity
64
64
[ Field , Key ]
65
65
public long Id { get ; private set ; }
66
66
67
- [ Field ]
67
+ [ Field ( Length = 50 ) ]
68
68
public string Title { get ; set ; }
69
69
70
70
[ Field ( Length = 13 ) ]
@@ -195,7 +195,7 @@ public class Book : Entity
195
195
[ Field , Key ]
196
196
public long Id { get ; private set ; }
197
197
198
- [ Field ]
198
+ [ Field ( Length = 50 ) ]
199
199
public string Title { get ; set ; }
200
200
201
201
[ Field ( Length = 13 ) ]
@@ -343,7 +343,7 @@ public class IgnoreRulesValidateTest
343
343
typeof ( ignorablePart . IgnoredTable ) , typeof ( ignorablePart . FieldInjector ) } ;
344
344
345
345
private readonly bool createConstraintsWithTable = StorageProviderInfo . Instance . Provider == StorageProvider . Sqlite ;
346
- private readonly bool dropIndexOnKeyColumnDelete = StorageProviderInfo . Instance . Provider == StorageProvider . PostgreSql ;
346
+ private readonly bool noExceptionOnIndexKeyColumnDrop = StorageProviderInfo . Instance . Provider . In ( StorageProvider . PostgreSql , StorageProvider . MySql ) ;
347
347
private readonly SqlDriver sqlDriver = TestSqlDriver . Create ( GetConnectionInfo ( ) ) ;
348
348
349
349
private Key changedOrderKey ;
@@ -411,7 +411,8 @@ public void IgnoreColumnTest()
411
411
Assert . That ( table . Columns . Any ( c => c . Name == "SimpleIgnoredColumn" ) , Is . True ) ;
412
412
Assert . That ( table . Columns . Count ( c => c . Name . StartsWith ( "IgnoreA" ) ) , Is . EqualTo ( 3 ) ) ;
413
413
Assert . That (
414
- schema . Tables . Where ( t => t . Name . StartsWith ( "MyEntity" ) ) . SelectMany ( t => t . Columns ) . Count ( c => c . Name . StartsWith ( "IgnoreB" ) ) ,
414
+ schema . Tables . Where ( t => t . Name . StartsWith ( "MyEntity" , StringComparison . OrdinalIgnoreCase ) )
415
+ . SelectMany ( t => t . Columns ) . Count ( c => c . Name . StartsWith ( "IgnoreB" ) ) ,
415
416
Is . EqualTo ( 6 ) ) ;
416
417
417
418
if ( StorageProviderInfo . Instance . CheckAllFeaturesSupported ( ProviderFeatures . ForeignKeyConstraints ) ) {
@@ -471,7 +472,9 @@ public void IgnoreIndexTest()
471
472
BuildDomain ( DomainUpgradeMode . Perform , ingnoreRuleCollection , model1Types ) . Dispose ( ) ;
472
473
473
474
Assert . That ( GetCatalog ( ) . DefaultSchema . Tables [ "Book" ] . Indexes . Any ( i => i . Name == "IX_Ignored_Index" ) , Is . True ) ;
474
- Assert . That ( GetCatalog ( ) . DefaultSchema . Tables [ "Book" ] . Indexes . Count ( i => i . Name . StartsWith ( "IX_GIgnored_Index" ) ) , Is . EqualTo ( 2 ) ) ;
475
+ Assert . That ( GetCatalog ( ) . DefaultSchema . Tables [ "Book" ] . Indexes
476
+ . Count ( i => i . Name . StartsWith ( "IX_GIgnored_Index" , StringComparison . OrdinalIgnoreCase ) ) ,
477
+ Is . EqualTo ( 2 ) ) ;
475
478
}
476
479
477
480
[ Test ]
@@ -659,7 +662,7 @@ public void DropKeyColumnOfIgnoredIndexTest()
659
662
660
663
var ignoreRuleCollection = new IgnoreRuleCollection ( ) ;
661
664
_ = ignoreRuleCollection . IgnoreIndex ( "IX_Ignored_Index" ) . WhenTable ( "MyEntity2" ) ;
662
- if ( dropIndexOnKeyColumnDelete ) {
665
+ if ( noExceptionOnIndexKeyColumnDrop ) {
663
666
BuildDomain ( DomainUpgradeMode . Perform , ignoreRuleCollection , model6Types ) . Dispose ( ) ;
664
667
}
665
668
else {
0 commit comments