using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations { /// public partial class updatetableretireresignemployee : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "RetirementResignEmployees", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") .Annotation("MySql:CharSet", "utf8mb4"), LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") .Annotation("MySql:CharSet", "utf8mb4"), CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") .Annotation("MySql:CharSet", "utf8mb4"), LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") .Annotation("MySql:CharSet", "utf8mb4"), Location = table.Column(type: "longtext", nullable: true, comment: "สถานที่ยื่นขอลาออกราชการ") .Annotation("MySql:CharSet", "utf8mb4"), SendDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันที่ยื่นขอออกราชการ"), ActiveDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันที่ขอออกราชการ"), Reason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลที่ลาออกจากราชการ") .Annotation("MySql:CharSet", "utf8mb4"), OrganizationPositionOld = table.Column(type: "longtext", nullable: true, comment: "สังกัด") .Annotation("MySql:CharSet", "utf8mb4"), PositionTypeOld = table.Column(type: "longtext", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท") .Annotation("MySql:CharSet", "utf8mb4"), PositionLevelOld = table.Column(type: "longtext", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ") .Annotation("MySql:CharSet", "utf8mb4"), PositionNumberOld = table.Column(type: "longtext", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่") .Annotation("MySql:CharSet", "utf8mb4"), AmountOld = table.Column(type: "double", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), Status = table.Column(type: "longtext", nullable: true, comment: "สถานะลาออก") .Annotation("MySql:CharSet", "utf8mb4"), ApproveReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติ") .Annotation("MySql:CharSet", "utf8mb4"), RejectReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลไม่อนุมัติ") .Annotation("MySql:CharSet", "utf8mb4"), CancelReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลยกเลิก") .Annotation("MySql:CharSet", "utf8mb4"), IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"), IsNoDebt = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะไม่เป็นหนี้สหกรณ์"), IsNoBurden = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"), IsDiscipline = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะพฤติการณ์ทางวินัย"), OligarchReject = table.Column(type: "tinyint(1)", nullable: true, comment: "สถานะยับยั้งผู้ดูแล"), OligarchApproveReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติผู้ดูแล") .Annotation("MySql:CharSet", "utf8mb4"), OligarchRejectReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลยับยั้งผู้ดูแล") .Annotation("MySql:CharSet", "utf8mb4"), OligarchRejectDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันที่ยับยั้งผู้ดูแล"), CommanderReject = table.Column(type: "tinyint(1)", nullable: true, comment: "สถานะยับยั้งผู้บังคับบัญชา"), CommanderApproveReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติผู้บังคับบัญชา") .Annotation("MySql:CharSet", "utf8mb4"), CommanderRejectReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลยับยั้งผู้บังคับบัญชา") .Annotation("MySql:CharSet", "utf8mb4"), CommanderRejectDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันที่ยับยั้งผู้บังคับบัญชา"), OfficerReject = table.Column(type: "tinyint(1)", nullable: true, comment: "สถานะยับยั้งการเจ้าหน้าที่"), OfficerApproveReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติการเจ้าหน้าที่") .Annotation("MySql:CharSet", "utf8mb4"), OfficerRejectReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลยับยั้งการเจ้าหน้าที่") .Annotation("MySql:CharSet", "utf8mb4"), OfficerRejectDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันที่ยับยั้งการเจ้าหน้าที่"), RemarkHorizontal = table.Column(type: "longtext", nullable: true, comment: "หมายเหตุแนวนอน") .Annotation("MySql:CharSet", "utf8mb4"), OrganizationOld = table.Column(type: "longtext", nullable: true, comment: "สังกัดเดิม") .Annotation("MySql:CharSet", "utf8mb4"), PositionOld = table.Column(type: "longtext", nullable: true, comment: "ตำแหน่งเดิม") .Annotation("MySql:CharSet", "utf8mb4"), profileId = table.Column(type: "longtext", nullable: true, comment: "profile Id") .Annotation("MySql:CharSet", "utf8mb4"), prefix = table.Column(type: "longtext", nullable: true, comment: "คำนำหน้า") .Annotation("MySql:CharSet", "utf8mb4"), firstName = table.Column(type: "longtext", nullable: true, comment: "ชื่อ") .Annotation("MySql:CharSet", "utf8mb4"), lastName = table.Column(type: "longtext", nullable: true, comment: "นามสกุล") .Annotation("MySql:CharSet", "utf8mb4"), citizenId = table.Column(type: "longtext", nullable: true, comment: "เลขบัตรประชาชน") .Annotation("MySql:CharSet", "utf8mb4"), rootOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root old") .Annotation("MySql:CharSet", "utf8mb4"), rootOldId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน root old") .Annotation("MySql:CharSet", "utf8mb4"), rootShortNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน root old") .Annotation("MySql:CharSet", "utf8mb4"), child1Old = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1 old") .Annotation("MySql:CharSet", "utf8mb4"), child1OldId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child1 old") .Annotation("MySql:CharSet", "utf8mb4"), child1ShortNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child1 old") .Annotation("MySql:CharSet", "utf8mb4"), child2Old = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2 old") .Annotation("MySql:CharSet", "utf8mb4"), child2OldId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child2 old") .Annotation("MySql:CharSet", "utf8mb4"), child2ShortNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child2 old") .Annotation("MySql:CharSet", "utf8mb4"), child3Old = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3 old") .Annotation("MySql:CharSet", "utf8mb4"), child3OldId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child3 old") .Annotation("MySql:CharSet", "utf8mb4"), child3ShortNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child3 old") .Annotation("MySql:CharSet", "utf8mb4"), child4Old = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4 old") .Annotation("MySql:CharSet", "utf8mb4"), child4OldId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child4 old") .Annotation("MySql:CharSet", "utf8mb4"), child4ShortNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child4 old") .Annotation("MySql:CharSet", "utf8mb4"), posMasterNoOld = table.Column(type: "int", nullable: true, comment: "เลขที่ตำแหน่ง old"), posTypeOldId = table.Column(type: "longtext", nullable: true, comment: "id ประเภทตำแหน่ง old") .Annotation("MySql:CharSet", "utf8mb4"), posTypeNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อประเภทตำแหน่ง old") .Annotation("MySql:CharSet", "utf8mb4"), posLevelOldId = table.Column(type: "longtext", nullable: true, comment: "id ระดับตำแหน่ง old") .Annotation("MySql:CharSet", "utf8mb4"), posLevelNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อระดับตำแหน่ง old") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_RetirementResignEmployees", x => x.Id); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "RetirementResignEmployeeCancels", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") .Annotation("MySql:CharSet", "utf8mb4"), LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") .Annotation("MySql:CharSet", "utf8mb4"), CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") .Annotation("MySql:CharSet", "utf8mb4"), LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") .Annotation("MySql:CharSet", "utf8mb4"), Location = table.Column(type: "longtext", nullable: true, comment: "สถานที่ยื่นขอลาออกราชการ") .Annotation("MySql:CharSet", "utf8mb4"), SendDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันที่ยื่นขอออกราชการ"), ActiveDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันที่ขอออกราชการ"), Reason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลที่ลาออกจากราชการ") .Annotation("MySql:CharSet", "utf8mb4"), OrganizationPositionOld = table.Column(type: "longtext", nullable: true, comment: "สังกัด") .Annotation("MySql:CharSet", "utf8mb4"), PositionTypeOld = table.Column(type: "longtext", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท") .Annotation("MySql:CharSet", "utf8mb4"), PositionLevelOld = table.Column(type: "longtext", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ") .Annotation("MySql:CharSet", "utf8mb4"), PositionNumberOld = table.Column(type: "longtext", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่") .Annotation("MySql:CharSet", "utf8mb4"), AmountOld = table.Column(type: "double", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), Status = table.Column(type: "longtext", nullable: true, comment: "สถานะลาออก") .Annotation("MySql:CharSet", "utf8mb4"), ApproveReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติ") .Annotation("MySql:CharSet", "utf8mb4"), RejectReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลไม่อนุมัติ") .Annotation("MySql:CharSet", "utf8mb4"), CancelReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลยกเลิก") .Annotation("MySql:CharSet", "utf8mb4"), IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"), IsNoDebt = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะไม่เป็นหนี้สหกรณ์"), IsNoBurden = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"), IsDiscipline = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะพฤติการณ์ทางวินัย"), OligarchReject = table.Column(type: "tinyint(1)", nullable: true, comment: "สถานะยับยั้งผู้ดูแล"), OligarchApproveReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติผู้ดูแล") .Annotation("MySql:CharSet", "utf8mb4"), OligarchRejectReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลยับยั้งผู้ดูแล") .Annotation("MySql:CharSet", "utf8mb4"), OligarchRejectDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันที่ยับยั้งผู้ดูแล"), CommanderReject = table.Column(type: "tinyint(1)", nullable: true, comment: "สถานะยับยั้งผู้บังคับบัญชา"), CommanderApproveReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติผู้บังคับบัญชา") .Annotation("MySql:CharSet", "utf8mb4"), CommanderRejectReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลยับยั้งผู้บังคับบัญชา") .Annotation("MySql:CharSet", "utf8mb4"), CommanderRejectDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันที่ยับยั้งผู้บังคับบัญชา"), OfficerReject = table.Column(type: "tinyint(1)", nullable: true, comment: "สถานะยับยั้งการเจ้าหน้าที่"), OfficerApproveReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลอนุมัติการเจ้าหน้าที่") .Annotation("MySql:CharSet", "utf8mb4"), OfficerRejectReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลยับยั้งการเจ้าหน้าที่") .Annotation("MySql:CharSet", "utf8mb4"), OfficerRejectDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันที่ยับยั้งการเจ้าหน้าที่"), RemarkHorizontal = table.Column(type: "longtext", nullable: true, comment: "หมายเหตุแนวนอน") .Annotation("MySql:CharSet", "utf8mb4"), OrganizationOld = table.Column(type: "longtext", nullable: true, comment: "สังกัดเดิม") .Annotation("MySql:CharSet", "utf8mb4"), PositionOld = table.Column(type: "longtext", nullable: true, comment: "ตำแหน่งเดิม") .Annotation("MySql:CharSet", "utf8mb4"), profileId = table.Column(type: "longtext", nullable: true, comment: "profile Id") .Annotation("MySql:CharSet", "utf8mb4"), prefix = table.Column(type: "longtext", nullable: true, comment: "คำนำหน้า") .Annotation("MySql:CharSet", "utf8mb4"), firstName = table.Column(type: "longtext", nullable: true, comment: "ชื่อ") .Annotation("MySql:CharSet", "utf8mb4"), lastName = table.Column(type: "longtext", nullable: true, comment: "นามสกุล") .Annotation("MySql:CharSet", "utf8mb4"), citizenId = table.Column(type: "longtext", nullable: true, comment: "เลขบัตรประชาชน") .Annotation("MySql:CharSet", "utf8mb4"), rootOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root old") .Annotation("MySql:CharSet", "utf8mb4"), rootOldId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน root old") .Annotation("MySql:CharSet", "utf8mb4"), rootShortNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน root old") .Annotation("MySql:CharSet", "utf8mb4"), child1Old = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1 old") .Annotation("MySql:CharSet", "utf8mb4"), child1OldId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child1 old") .Annotation("MySql:CharSet", "utf8mb4"), child1ShortNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child1 old") .Annotation("MySql:CharSet", "utf8mb4"), child2Old = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2 old") .Annotation("MySql:CharSet", "utf8mb4"), child2OldId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child2 old") .Annotation("MySql:CharSet", "utf8mb4"), child2ShortNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child2 old") .Annotation("MySql:CharSet", "utf8mb4"), child3Old = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3 old") .Annotation("MySql:CharSet", "utf8mb4"), child3OldId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child3 old") .Annotation("MySql:CharSet", "utf8mb4"), child3ShortNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child3 old") .Annotation("MySql:CharSet", "utf8mb4"), child4Old = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4 old") .Annotation("MySql:CharSet", "utf8mb4"), child4OldId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child4 old") .Annotation("MySql:CharSet", "utf8mb4"), child4ShortNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child4 old") .Annotation("MySql:CharSet", "utf8mb4"), posMasterNoOld = table.Column(type: "int", nullable: true, comment: "เลขที่ตำแหน่ง old"), posTypeOldId = table.Column(type: "longtext", nullable: true, comment: "id ประเภทตำแหน่ง old") .Annotation("MySql:CharSet", "utf8mb4"), posTypeNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อประเภทตำแหน่ง old") .Annotation("MySql:CharSet", "utf8mb4"), posLevelOldId = table.Column(type: "longtext", nullable: true, comment: "id ระดับตำแหน่ง old") .Annotation("MySql:CharSet", "utf8mb4"), posLevelNameOld = table.Column(type: "longtext", nullable: true, comment: "ชื่อระดับตำแหน่ง old") .Annotation("MySql:CharSet", "utf8mb4"), RetirementResignEmployeeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") }, constraints: table => { table.PrimaryKey("PK_RetirementResignEmployeeCancels", x => x.Id); table.ForeignKey( name: "FK_RetirementResignEmployeeCancels_RetirementResignEmployees_Re~", column: x => x.RetirementResignEmployeeId, principalTable: "RetirementResignEmployees", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "RetirementResignEmployeeDebtDocs", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") .Annotation("MySql:CharSet", "utf8mb4"), LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") .Annotation("MySql:CharSet", "utf8mb4"), CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") .Annotation("MySql:CharSet", "utf8mb4"), LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") .Annotation("MySql:CharSet", "utf8mb4"), DocumentId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), RetirementResignEmployeeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") }, constraints: table => { table.PrimaryKey("PK_RetirementResignEmployeeDebtDocs", x => x.Id); table.ForeignKey( name: "FK_RetirementResignEmployeeDebtDocs_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_RetirementResignEmployeeDebtDocs_RetirementResignEmployees_R~", column: x => x.RetirementResignEmployeeId, principalTable: "RetirementResignEmployees", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "RetirementResignEmployeeDocs", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") .Annotation("MySql:CharSet", "utf8mb4"), LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") .Annotation("MySql:CharSet", "utf8mb4"), CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") .Annotation("MySql:CharSet", "utf8mb4"), LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") .Annotation("MySql:CharSet", "utf8mb4"), DocumentId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), RetirementResignEmployeeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") }, constraints: table => { table.PrimaryKey("PK_RetirementResignEmployeeDocs", x => x.Id); table.ForeignKey( name: "FK_RetirementResignEmployeeDocs_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_RetirementResignEmployeeDocs_RetirementResignEmployees_Retir~", column: x => x.RetirementResignEmployeeId, principalTable: "RetirementResignEmployees", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( name: "IX_RetirementResignEmployeeCancels_RetirementResignEmployeeId", table: "RetirementResignEmployeeCancels", column: "RetirementResignEmployeeId"); migrationBuilder.CreateIndex( name: "IX_RetirementResignEmployeeDebtDocs_DocumentId", table: "RetirementResignEmployeeDebtDocs", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_RetirementResignEmployeeDebtDocs_RetirementResignEmployeeId", table: "RetirementResignEmployeeDebtDocs", column: "RetirementResignEmployeeId"); migrationBuilder.CreateIndex( name: "IX_RetirementResignEmployeeDocs_DocumentId", table: "RetirementResignEmployeeDocs", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_RetirementResignEmployeeDocs_RetirementResignEmployeeId", table: "RetirementResignEmployeeDocs", column: "RetirementResignEmployeeId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "RetirementResignEmployeeCancels"); migrationBuilder.DropTable( name: "RetirementResignEmployeeDebtDocs"); migrationBuilder.DropTable( name: "RetirementResignEmployeeDocs"); migrationBuilder.DropTable( name: "RetirementResignEmployees"); } } }