File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using DotNetProjects . Migrator . Framework ;
2- using DotNetProjects . Migrator . Providers . Impl . SQLite ;
32
43namespace Migrator . Tests . Data ;
54
@@ -65,22 +64,3 @@ public virtual void InitializeOnce(string[] args)
6564 {
6665 }
6766}
68-
69- [ Migration ( 3 , DisableForeignKeysInSqlite = true ) ]
70- public class ThirdTestMigration : Migration
71- {
72- public override void Up ( )
73- {
74- if ( this . Database is SQLiteTransformationProvider sqlite )
75- {
76- if ( sqlite . IsPragmaForeignKeysOn ( ) )
77- {
78- throw new System . Exception ( "Disableling of Foreign keys was not possible" ) ;
79- }
80- }
81- }
82-
83- public override void Down ( )
84- {
85- }
86- }
Original file line number Diff line number Diff line change @@ -55,9 +55,4 @@ public bool Ignore
5555 get { return _ignore ; }
5656 set { _ignore = value ; }
5757 }
58-
59- /// <summary>
60- /// Disable Foreign Keys in Sqlite
61- /// </summary>
62- public bool DisableForeignKeysInSqlite { get ; set ; }
6358}
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public override void Migrate(IMigration migration)
6969 var attr = ( MigrationAttribute ) Attribute . GetCustomAttribute ( migration . GetType ( ) , typeof ( MigrationAttribute ) ) ;
7070#endif
7171 var foreignKeysWasOn = false ;
72- if ( attr . DisableForeignKeysInSqlite && _provider is SQLiteTransformationProvider sqlite )
72+ if ( _provider is SQLiteTransformationProvider sqlite )
7373 {
7474 foreignKeysWasOn = sqlite . IsPragmaForeignKeysOn ( ) ;
7575 if ( foreignKeysWasOn )
You can’t perform that action at this time.
0 commit comments