Skip to content

Commit 8ae911a

Browse files
committed
Don't try to run migrations on cleanup
1 parent 5d94d00 commit 8ae911a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Thinktecture.EntityFrameworkCore.SqlServer.Testing/EntityFrameworkCore/Testing/SqlServerTestDbContextProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ private void DisposeContextsAndRollbackMigrations()
251251
if (_isolationOptions.NeedsCleanup)
252252
{
253253
// Create a new ctx as a last resort to rollback migrations and clean up the database
254-
using var ctx = _actDbContext ?? _arrangeDbContext ?? _assertDbContext ?? CreateDbContext(true);
254+
using var ctx = _actDbContext ?? _arrangeDbContext ?? _assertDbContext ?? CreateDbContext(_masterDbContextOptions, new DbDefaultSchema(Schema));
255255

256256
_isolationOptions.Cleanup(ctx, Schema);
257257
}

0 commit comments

Comments
 (0)