c5375b661b
broke data out into its own library. may be breaking changes with existing plugins
25 lines
821 B
C#
25 lines
821 B
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace Data.Migrations.Postgresql
|
|
{
|
|
public partial class SetCaseSensitiveCoallationForAliasNameMySQL : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
if (migrationBuilder.ActiveProvider == "Pomelo.EntityFrameworkCore.MySql")
|
|
{
|
|
// this prevents duplicate aliases from being added by changing it to case sensitive collation
|
|
migrationBuilder.Sql(@"ALTER TABLE `EFAlias` MODIFY
|
|
`Name` VARCHAR(24)
|
|
CHARACTER SET utf8
|
|
COLLATE utf8_bin;");
|
|
};
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|