@@ -25,14 +25,25 @@ protected override void CheckSingleTableComparisonResult(SchemaComparisonResult
25
25
{
26
26
Assert . That ( comparisonResult , Is . Not . Null ) ;
27
27
Assert . That ( comparisonResult . HasUnsafeActions , Is . True ) ;
28
- Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 4 ) ) ;
29
28
30
- var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
31
- Assert . That ( structureActions . Count , Is . EqualTo ( 2 ) ) ;
32
- Assert . That ( structureActions
33
- . All ( a => a . Path == $ "Tables/SingleTableRoot/Columns/FieldToChangeTypeRoot"
34
- || a . Path == "Tables/SingleTableRoot/Columns/FieldToChangeTypeLeaf" ) ,
35
- Is . True ) ;
29
+ if ( StorageProviderInfo . Instance . CheckProviderIs ( StorageProvider . Sqlite ) ) {
30
+ // length change is not important for SQLite
31
+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 3 ) ) ;
32
+
33
+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
34
+ Assert . That ( structureActions . Count , Is . EqualTo ( 1 ) ) ;
35
+ Assert . That ( structureActions [ 0 ] . Path == $ "Tables/SingleTableRoot/Columns/FieldToChangeTypeRoot") ;
36
+ }
37
+ else {
38
+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 4 ) ) ;
39
+
40
+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
41
+ Assert . That ( structureActions . Count , Is . EqualTo ( 2 ) ) ;
42
+ Assert . That ( structureActions
43
+ . All ( a => a . Path == $ "Tables/SingleTableRoot/Columns/FieldToChangeTypeRoot"
44
+ || a . Path == "Tables/SingleTableRoot/Columns/FieldToChangeTypeLeaf" ) ,
45
+ Is . True ) ;
46
+ }
36
47
37
48
var dataActions = comparisonResult . UnsafeActions . OfType < DataAction > ( ) . ToList ( ) ;
38
49
Assert . That ( dataActions . Count , Is . EqualTo ( 2 ) ) ;
@@ -44,14 +55,24 @@ protected override void CheckClassTableComparisonResult(SchemaComparisonResult c
44
55
{
45
56
Assert . That ( comparisonResult , Is . Not . Null ) ;
46
57
Assert . That ( comparisonResult . HasUnsafeActions , Is . True ) ;
47
- Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 5 ) ) ;
58
+ if ( StorageProviderInfo . Instance . CheckProviderIs ( StorageProvider . Sqlite ) ) {
59
+ // length change is not important for SQLite
60
+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 4 ) ) ;
48
61
49
- var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
50
- Assert . That ( structureActions . Count , Is . EqualTo ( 2 ) ) ;
51
- Assert . That ( structureActions
52
- . All ( a => a . Path == $ "Tables/ClassTableRoot/Columns/FieldToChangeTypeRoot"
53
- || a . Path == "Tables/ClassTableLeaf/Columns/FieldToChangeTypeLeaf" ) ,
54
- Is . True ) ;
62
+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
63
+ Assert . That ( structureActions . Count , Is . EqualTo ( 1 ) ) ;
64
+ Assert . That ( structureActions [ 0 ] . Path == $ "Tables/ClassTableRoot/Columns/FieldToChangeTypeRoot") ;
65
+ }
66
+ else {
67
+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 5 ) ) ;
68
+
69
+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
70
+ Assert . That ( structureActions . Count , Is . EqualTo ( 2 ) ) ;
71
+ Assert . That ( structureActions
72
+ . All ( a => a . Path == $ "Tables/ClassTableRoot/Columns/FieldToChangeTypeRoot"
73
+ || a . Path == "Tables/ClassTableLeaf/Columns/FieldToChangeTypeLeaf" ) ,
74
+ Is . True ) ;
75
+ }
55
76
56
77
var dataActions = comparisonResult . UnsafeActions . OfType < DataAction > ( ) . ToList ( ) ;
57
78
Assert . That ( dataActions . Count , Is . EqualTo ( 3 ) ) ;
@@ -64,14 +85,27 @@ protected override void CheckConcreteTableComparisonResult(SchemaComparisonResul
64
85
{
65
86
Assert . That ( comparisonResult , Is . Not . Null ) ;
66
87
Assert . That ( comparisonResult . HasUnsafeActions , Is . True ) ;
67
- Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 5 ) ) ;
68
-
69
- var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
70
- Assert . That ( structureActions . Count , Is . EqualTo ( 3 ) ) ;
71
- Assert . That ( structureActions
72
- . All ( a => a . Path . Contains ( $ "Columns/FieldToChangeTypeRoot", StringComparison . Ordinal )
73
- || a . Path . Contains ( $ "Columns/FieldToChangeTypeLeaf", StringComparison . Ordinal ) ) ,
74
- Is . True ) ;
88
+
89
+ if ( StorageProviderInfo . Instance . CheckProviderIs ( StorageProvider . Sqlite ) ) {
90
+ // length change is not important for SQLite
91
+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 4 ) ) ;
92
+
93
+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
94
+ Assert . That ( structureActions . Count , Is . EqualTo ( 2 ) ) ;
95
+ Assert . That ( structureActions
96
+ . All ( a => a . Path . Contains ( $ "Columns/FieldToChangeTypeRoot", StringComparison . Ordinal ) ) ,
97
+ Is . True ) ;
98
+ }
99
+ else {
100
+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 5 ) ) ;
101
+
102
+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
103
+ Assert . That ( structureActions . Count , Is . EqualTo ( 3 ) ) ;
104
+ Assert . That ( structureActions
105
+ . All ( a => a . Path . Contains ( $ "Columns/FieldToChangeTypeRoot", StringComparison . Ordinal )
106
+ || a . Path . Contains ( $ "Columns/FieldToChangeTypeLeaf", StringComparison . Ordinal ) ) ,
107
+ Is . True ) ;
108
+ }
75
109
76
110
var dataActions = comparisonResult . UnsafeActions . OfType < DataAction > ( ) . ToList ( ) ;
77
111
Assert . That ( dataActions . Count , Is . EqualTo ( 2 ) ) ;
0 commit comments