Hi heaxyh,
by increasing the CommandTimeout you will prevent the timeout and consequently the lock on __EFMigrations table. This timeout increases the time on the transaction itself
services.AddDbContext<XContext>((srv, options) =>
{
options.UseSqlServer("ConnectionString", opts => { opts.MigrationsAssembly("MigrationProject"); opts.CommandTimeout(appSettings.CommandTimeoutInSeconds);});
});
kind regards,