add check db is not there create db not there same as table
This commit is contained in:
@@ -123,7 +123,16 @@ using (var scope = app.Services.CreateScope())
|
||||
//if (!databaseCreator.Exists())
|
||||
try
|
||||
{
|
||||
databaseCreator.CreateTables();
|
||||
// Check if database exists
|
||||
if (!databaseCreator.Exists())
|
||||
{
|
||||
databaseCreator.Create();
|
||||
}
|
||||
|
||||
if (!databaseCreator.HasTables())
|
||||
{
|
||||
databaseCreator.CreateTables();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user