diff --git a/src/NzbDrone.Core/Datastore/Migration/Framework/MigrationExtension.cs b/src/NzbDrone.Core/Datastore/Migration/Framework/MigrationExtension.cs index e0ec93774..ab390f6f7 100644 --- a/src/NzbDrone.Core/Datastore/Migration/Framework/MigrationExtension.cs +++ b/src/NzbDrone.Core/Datastore/Migration/Framework/MigrationExtension.cs @@ -22,6 +22,15 @@ public static ICreateTableColumnOptionOrWithColumnSyntax TableForModel(this ICre return expressionRoot.Table(name).WithColumn("Id").AsInt32().PrimaryKey().Identity(); } + public static IDbCommand CreateCommand(this IDbConnection conn, IDbTransaction tran, string query) + { + var command = conn.CreateCommand(); + command.Transaction = tran; + command.CommandText = query; + + return command; + } + public static void AddParameter(this IDbCommand command, object value) { var parameter = command.CreateParameter();