File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
examples/src/EntityFrameworkCore.Ydb.QuickStart Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,14 @@ public BloggingContext CreateDbContext(string[] args)
3333 {
3434 var optionsBuilder = new DbContextOptionsBuilder < BloggingContext > ( ) ;
3535
36+ // IMPORTANT!
37+ // Disables retries for the migrations context.
38+ // Required because migration operations may use suppressed or explicit transactions,
39+ // and enabling retries in this case leads to runtime errors with this provider.
40+ //
41+ // "User transaction is not supported with a TransactionSuppressed migrations or a retrying execution strategy."
42+ //
43+ // Bottom line: ALWAYS disable retries for design-time/migration contexts to avoid migration failures and errors.
3644 return new BloggingContext (
3745 optionsBuilder . UseYdb ( "Host=localhost;Port=2136;Database=/local" ,
3846 builder => builder . DisableRetryOnFailure ( )
You can’t perform that action at this time.
0 commit comments