We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0763d01 commit 0b4a67fCopy full SHA for 0b4a67f
src/Templates/Boilerplate/Bit.Boilerplate/src/Tests/TestsInitializer.cs
@@ -101,14 +101,7 @@ private static async Task InitializeDatabase(AppTestServer testServer)
101
}
102
//#endif
103
104
- if ((await dbContext.Database.GetPendingMigrationsAsync()).Any())
105
- {
106
- await dbContext.Database.MigrateAsync();
107
- }
108
- else if ((await dbContext.Database.GetAppliedMigrationsAsync()).Any() is false)
109
110
- throw new InvalidOperationException("No migrations have been added. Please ensure that migrations are added before running tests.");
111
+ await dbContext.Database.EnsureCreatedAsync(); // It's recommended to start using ef-core migrations.
112
113
114
0 commit comments