Description
A while ago the default migration script generation behavior was changed to always wrap the migration code inside a transaction.
It can be changed when running the migrations through the command console or package manager console and passing the --no-transactions
option.
It can not be changed when calling the DbContext.Database.MigrateAsync. There's no parameter to tell the Migrate method to not use transactions.
I'm using YugabyteDB which doesn't support DDL code inside transactions.
I like to have a DatabaseMigrator application which is run during CI/CD to create, migrate and seed all our databases.
Could we add an optional bool
parameter (e.g. suppressTransactions
) to the DbContext.Database.MigrateAsync and DbContext.Database.Migrate methods, which when set would mean that the generated migration code will not contain transactions.