revert to use our stringtypemapping to generate the sql literal. Some regex depends on using this format to pick the filename from the connection string

pull/131/head
Christopher Jolly 3 years ago
parent d100231ce9
commit 81f6cbb254

@ -454,13 +454,13 @@ namespace Microsoft.EntityFrameworkCore.Migrations
builder
.Append("CREATE DATABASE ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(operation.Name));
.Append(_stringTypeMapping.GenerateSqlLiteral(operation.Name));
if (!string.IsNullOrEmpty(operation.Password))
{
builder
.Append(" PASSWORD ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(operation.Password));
.Append(_stringTypeMapping.GenerateSqlLiteral(operation.Password));
}
builder
@ -508,7 +508,7 @@ namespace Microsoft.EntityFrameworkCore.Migrations
builder
.Append("DROP DATABASE ")
//.Append(ExpandFileName(operation.Name))
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(operation.Name))
.Append(_stringTypeMapping.GenerateSqlLiteral(operation.Name))
.AppendLine(Dependencies.SqlGenerationHelper.StatementTerminator)
.EndCommand(suppressTransaction: true);
}

@ -386,7 +386,7 @@ ALTER TABLE `Person` ALTER COLUMN [Id] bigint NOT NULL;
new JetCreateDatabaseOperation { Name = "Northwind" });
AssertSql(
@"CREATE DATABASE `Northwind`;
@"CREATE DATABASE 'Northwind';
");
}
@ -511,7 +511,7 @@ ALTER TABLE `Person` ALTER COLUMN [Id] bigint NOT NULL;
new JetDropDatabaseOperation { Name = "Northwind" });
AssertSql(
@"DROP DATABASE `Northwind`;
@"DROP DATABASE 'Northwind';
");
}

Loading…
Cancel
Save