mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-04-06 02:19:05 +00:00
Change dir name for migrations, update docker config to seed db
This commit is contained in:
@@ -22,14 +22,14 @@ try
|
||||
await useMaster.ExecuteNonQueryAsync();
|
||||
|
||||
var dbName = "Biergarten";
|
||||
var dropDb = connection.CreateCommand();
|
||||
dropDb.CommandText = $@"
|
||||
IF DB_ID(N'{dbName}') IS NOT NULL
|
||||
BEGIN
|
||||
ALTER DATABASE [{dbName}] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
|
||||
DROP DATABASE [{dbName}];
|
||||
END";
|
||||
await dropDb.ExecuteNonQueryAsync();
|
||||
var dropDb = connection.CreateCommand();
|
||||
dropDb.CommandText = $@"
|
||||
IF DB_ID(N'{dbName}') IS NOT NULL
|
||||
BEGIN
|
||||
ALTER DATABASE [{dbName}] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
|
||||
DROP DATABASE [{dbName}];
|
||||
END";
|
||||
await dropDb.ExecuteNonQueryAsync();
|
||||
|
||||
var createDb = connection.CreateCommand();
|
||||
createDb.CommandText = $@"CREATE DATABASE [{dbName}];";
|
||||
|
||||
Reference in New Issue
Block a user