Skip to content

Commit e0f686c

Browse files
JaBistDuNarrischJaBistDuNarrisch
authored andcommitted
Added RemoveConstraint
1 parent af56450 commit e0f686c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Migrator/Providers/Impl/SQLite/SQLiteTransformationProvider.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,14 @@ public override void AddUniqueConstraint(string name, string table, params strin
641641
RecreateTable(sqliteTableInfo);
642642
}
643643

644+
public override void RemoveConstraint(string table, string name)
645+
{
646+
var sqliteTableInfo = GetSQLiteTableInfo(table);
647+
sqliteTableInfo.Uniques.RemoveAll(x => x.Name.Equals(name, StringComparison.OrdinalIgnoreCase));
648+
649+
RecreateTable(sqliteTableInfo);
650+
}
651+
644652
public SQLiteTableInfo GetSQLiteTableInfo(string tableName)
645653
{
646654
var sqliteTable = new SQLiteTableInfo

0 commit comments

Comments
 (0)