using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace LY.MicroService.BackendAdmin.Migrations { public partial class AlterCultureFieldAllowBeNull : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "Culture", table: "AbpTextTemplates", type: "varchar(30)", maxLength: 30, nullable: true, oldClrType: typeof(string), oldType: "varchar(30)", oldMaxLength: 30) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.UpdateData( table: "AbpTextTemplates", keyColumn: "Culture", keyValue: null, column: "Culture", value: ""); migrationBuilder.AlterColumn( name: "Culture", table: "AbpTextTemplates", type: "varchar(30)", maxLength: 30, nullable: false, oldClrType: typeof(string), oldType: "varchar(30)", oldMaxLength: 30, oldNullable: true) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }