put try and continue
This commit is contained in:
@@ -104,8 +104,18 @@ using (var scope = app.Services.CreateScope())
|
||||
if (db != null)
|
||||
{
|
||||
|
||||
db.Migrate();
|
||||
try
|
||||
{
|
||||
using var cts = new CancellationTokenSource();
|
||||
CancellationToken cancellationToken = cts.Token;
|
||||
await db.MigrateAsync(cancellationToken);
|
||||
db.EnsureCreated();
|
||||
}
|
||||
catch
|
||||
{
|
||||
//continue
|
||||
}
|
||||
|
||||
var staff = context.GetService<Seed>();
|
||||
int id = staff.InsertOneUser();
|
||||
if (id < 0)
|
||||
@@ -114,8 +124,16 @@ using (var scope = app.Services.CreateScope())
|
||||
if (databaseCreator != null)
|
||||
{
|
||||
//if (!databaseCreator.Exists())
|
||||
try
|
||||
{
|
||||
databaseCreator.CreateTables();
|
||||
}
|
||||
catch
|
||||
{
|
||||
//continue
|
||||
}
|
||||
|
||||
}
|
||||
id = staff.InsertOneUser();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user