using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb { /// public partial class updatetableDisciplineDirectorscommandnonullable : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "Duty", table: "DisciplineInvestigate_Directors", type: "longtext", nullable: true, comment: "หน้าที่", oldClrType: typeof(string), oldType: "longtext", oldComment: "หน้าที่") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "CommandNo", table: "DisciplineInvestigate_Directors", type: "longtext", nullable: true, comment: "เลขที่คำสั่ง", oldClrType: typeof(string), oldType: "longtext", oldComment: "เลขที่คำสั่ง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "Duty", table: "DisciplineDisciplinary_DirectorInvestigates", type: "longtext", nullable: true, comment: "หน้าที่", oldClrType: typeof(string), oldType: "longtext", oldComment: "หน้าที่") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "CommandNo", table: "DisciplineDisciplinary_DirectorInvestigates", type: "longtext", nullable: true, comment: "เลขที่คำสั่ง", oldClrType: typeof(string), oldType: "longtext", oldComment: "เลขที่คำสั่ง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.UpdateData( table: "DisciplineInvestigate_Directors", keyColumn: "Duty", keyValue: null, column: "Duty", value: ""); migrationBuilder.AlterColumn( name: "Duty", table: "DisciplineInvestigate_Directors", type: "longtext", nullable: false, comment: "หน้าที่", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "หน้าที่") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.UpdateData( table: "DisciplineInvestigate_Directors", keyColumn: "CommandNo", keyValue: null, column: "CommandNo", value: ""); migrationBuilder.AlterColumn( name: "CommandNo", table: "DisciplineInvestigate_Directors", type: "longtext", nullable: false, comment: "เลขที่คำสั่ง", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "เลขที่คำสั่ง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.UpdateData( table: "DisciplineDisciplinary_DirectorInvestigates", keyColumn: "Duty", keyValue: null, column: "Duty", value: ""); migrationBuilder.AlterColumn( name: "Duty", table: "DisciplineDisciplinary_DirectorInvestigates", type: "longtext", nullable: false, comment: "หน้าที่", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "หน้าที่") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.UpdateData( table: "DisciplineDisciplinary_DirectorInvestigates", keyColumn: "CommandNo", keyValue: null, column: "CommandNo", value: ""); migrationBuilder.AlterColumn( name: "CommandNo", table: "DisciplineDisciplinary_DirectorInvestigates", type: "longtext", nullable: false, comment: "เลขที่คำสั่ง", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "เลขที่คำสั่ง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }