IW4M-Admin/SharedLibraryCore/Migrations/MySql/20180911190823_AddEFAliasNameMaxLength24.cs
RaidMax 36a02b3d7b update for database provider specific migrations
fix issues with live radar
2020-11-27 21:52:52 -06:00

26 lines
792 B
C#

using Microsoft.EntityFrameworkCore.Migrations;
namespace SharedLibraryCore.Migrations.MySql
{
public partial class AddEFAliasNameMaxLength24 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
// hack: we can't alter the column on SQLite, but we need max length limit for the Index in MySQL etc
if (migrationBuilder.ActiveProvider != "Microsoft.EntityFrameworkCore.Sqlite")
{
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "EFAlias",
maxLength: 24,
nullable: false);
}
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}