I want to enable broker for my database in an Entity Framework migration. I add a migration to my project and write this code in the Up method :
Sql("ALTER DATABASE current SET ENABLE_BROKER", true);
This code runs correctly for SQL Server 2014, but when I change my target database to SQL Server 2008 R2 Express, I get this error:
Incorrect syntax near the keyword 'current'
How do I change the code to run properly for all type of SQL Server instances?