using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations { /// public partial class updatetablePlacementReciveaddreportdate1 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { // migrationBuilder.DropColumn( // name: "PositionOld", // table: "PlacementReceives"); migrationBuilder.DropColumn( name: "RecruitDate", table: "PlacementAppointments"); // migrationBuilder.RenameColumn( // name: "positionOld", // table: "PlacementReceives", // newName: "PositionOld"); migrationBuilder.RenameColumn( name: "RecruitDate", table: "PlacementReceives", newName: "ReportingDate"); // migrationBuilder.AlterColumn( // name: "PositionOld", // table: "PlacementReceives", // type: "longtext", // nullable: true, // comment: "ตำแหน่งเดิม", // oldClrType: typeof(string), // oldType: "longtext", // oldNullable: true, // oldComment: "ชื่อตำแหน่งในสายงาน old") // .Annotation("MySql:CharSet", "utf8mb4") // .OldAnnotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { // migrationBuilder.RenameColumn( // name: "PositionOld", // table: "PlacementReceives", // newName: "positionOld"); migrationBuilder.RenameColumn( name: "ReportingDate", table: "PlacementReceives", newName: "RecruitDate"); // migrationBuilder.AlterColumn( // name: "positionOld", // table: "PlacementReceives", // type: "longtext", // nullable: true, // comment: "ชื่อตำแหน่งในสายงาน old", // oldClrType: typeof(string), // oldType: "longtext", // oldNullable: true, // oldComment: "ตำแหน่งเดิม") // .Annotation("MySql:CharSet", "utf8mb4") // .OldAnnotation("MySql:CharSet", "utf8mb4"); // migrationBuilder.AddColumn( // name: "PositionOld", // table: "PlacementReceives", // type: "longtext", // nullable: true, // comment: "ตำแหน่งเดิม") // .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "RecruitDate", table: "PlacementAppointments", type: "datetime(6)", nullable: true, comment: "วันที่บรรจุ"); } } }