using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb { /// public partial class updatetableDisciplineDirectorsaddqualification : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "Phone", table: "DisciplineDirectors", type: "longtext", nullable: true, comment: "เบอร์โทรศัพท์", oldClrType: typeof(string), oldType: "longtext", oldComment: "เบอร์โทรศัพท์") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "Email", table: "DisciplineDirectors", type: "longtext", nullable: true, comment: "อีเมล", oldClrType: typeof(string), oldType: "longtext", oldComment: "อีเมล") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "Qualification", table: "DisciplineDirectors", type: "longtext", nullable: true, comment: "คุณวุฒิ") .Annotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "Qualification", table: "DisciplineDirectors"); migrationBuilder.UpdateData( table: "DisciplineDirectors", keyColumn: "Phone", keyValue: null, column: "Phone", value: ""); migrationBuilder.AlterColumn( name: "Phone", table: "DisciplineDirectors", type: "longtext", nullable: false, comment: "เบอร์โทรศัพท์", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "เบอร์โทรศัพท์") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.UpdateData( table: "DisciplineDirectors", keyColumn: "Email", keyValue: null, column: "Email", value: ""); migrationBuilder.AlterColumn( name: "Email", table: "DisciplineDirectors", type: "longtext", nullable: false, comment: "อีเมล", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "อีเมล") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }