We have a database that we're creating and managing with FluentMigrator.
Now we have a need to do an alter database on it:
ALTER DATABASE CURRENT SET ENABLE_BROKER
We're going to have some tables watched using Sql Dependency, and that requires that this flag be set on the database.
Trying to run this in a migration throws an exception:
System.Data.SqlClient.SqlException: ALTER DATABASE statement not allowed within multi-statement transaction.
Is there a way to run an ALTER DATABASE statement from within a migration?