Migrations outside of transaction

I have a special use case where we like to create a CREATE FULL TEXT INDEX using a migration.

However, at least with SQL Server that command must be run outside of a user transaction.

Is there a way in the Migrations to run something outside of the transaction implicitly started in Up and Down?

Instead of using the pre-configured base.Db connection, create your own from within the Migration, e.g:

public class Migration1000 : MigrationBase
{
    public override void Up()
    {
        using var db = DbFactory.OpenDbConnection();
        //...
    }
}
1 Like

Thanks, that seems to do the trick.