Skip to content

Commit ddf5015

Browse files
JaBistDuNarrischJaBistDuNarrisch
authored andcommitted
Added check for CheckConstraints in AddTable in TransformationProvider
1 parent 3f61417 commit ddf5015

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Migrator/Providers/TransformationProvider.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,11 @@ public virtual void AddView(string name, string tableName, params IViewElement[]
380380
/// </example>
381381
public virtual void AddTable(string name, params IDbField[] columns)
382382
{
383+
if (columns.Any(x => x is CheckConstraint))
384+
{
385+
throw new MigrationException($"{nameof(CheckConstraint)}s are currently supported in SQLite only.");
386+
}
387+
383388
// Most databases don't have the concept of a storage engine, so default is to not use it.
384389
AddTable(name, null, columns);
385390
}

0 commit comments

Comments
 (0)