Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,7 @@ private static async Task InitializeDatabase(AppTestServer testServer)
}
//#endif
//#endif
if ((await dbContext.Database.GetPendingMigrationsAsync()).Any())
{
await dbContext.Database.MigrateAsync();
}
else if ((await dbContext.Database.GetAppliedMigrationsAsync()).Any() is false)
{
throw new InvalidOperationException("No migrations have been added. Please ensure that migrations are added before running tests.");
}
await dbContext.Database.EnsureCreatedAsync(); // It's recommended to start using ef-core migrations.
}
}

Expand Down
Loading