Skip to content

Commit

Permalink
Modified ALTER DATABASE statement to support complex names. (#19291)
Browse files Browse the repository at this point in the history
  • Loading branch information
knom authored and ajcvickers committed Dec 12, 2019
1 parent d3214e2 commit 1a1fc70
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ protected override void Generate(
builder
.AppendLine("BEGIN")
.AppendLine("DECLARE @db_name NVARCHAR(MAX) = DB_NAME();")
.AppendLine("EXEC(N'ALTER DATABASE ' + @db_name + ' MODIFY ( ")
.AppendLine("EXEC(N'ALTER DATABASE [' + @db_name + '] MODIFY ( ")
.Append(editionOptions.Replace("'", "''"))
.AppendLine(" );');")
.AppendLine("END")
Expand Down

0 comments on commit 1a1fc70

Please sign in to comment.