Skip to content

Commit 1894f7f

Browse files
committed
Merge pull request migratordotnet#7 from Schlupp77/master
Repair Drop Database with SqlServer
2 parents a222bbb + cdb7015 commit 1894f7f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Migrator.Providers/Impl/SqlServer/SqlServerTransformationProvider.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@ public override List<string> GetDatabases()
303303
return ExecuteStringQuery("SELECT name FROM sys.databases");
304304
}
305305

306+
public override void DropDatabases(string databaseName)
307+
{
308+
ExecuteNonQuery(string.Format("USE [master]" + System.Environment.NewLine + "DROP DATABASE {0}", databaseName));
309+
}
310+
306311
public override void RemoveColumn(string table, string column)
307312
{
308313
DeleteColumnConstraints(table, column);

0 commit comments

Comments
 (0)