Commit d199452 1 parent c58a6c7 commit d199452 Copy full SHA for d199452
File tree 1 file changed +1
-18
lines changed
1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -23,24 +23,7 @@ public static async Task EnsureDbCreatedAndSeedWithDefaults(DbContextOptions<App
23
23
try
24
24
{
25
25
// not good with distributed UI... but for now...
26
-
27
- var migrations = await context . Database . GetPendingMigrationsAsync ( ) ;
28
- foreach ( var migration in migrations )
29
- {
30
- // Execute all migrations in one single transaction
31
- using var tran = await context . Database . BeginTransactionAsync ( ) ;
32
- try
33
- {
34
- Console . WriteLine ( $ "Applying migration '{ migration } '...") ;
35
- await migrator . MigrateAsync ( migration ) ;
36
- await tran . CommitAsync ( ) ;
37
- }
38
- catch ( Exception exc )
39
- {
40
- await tran . RollbackAsync ( ) ;
41
- throw new Exception ( $ "Error while applying db migration '{ migration } '.", exc ) ;
42
- }
43
- }
26
+ await context . Database . MigrateAsync ( ) ;
44
27
}
45
28
catch ( Exception ex )
46
29
{
You can’t perform that action at this time.
0 commit comments