using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations { /// public partial class update_table_discipline_add_dna : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "child1DnaOldId", table: "RetirementResignEmployeeCancels", type: "longtext", nullable: true, comment: "id หน่วยงาน child1 old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaOldId", table: "RetirementResignEmployeeCancels", type: "longtext", nullable: true, comment: "id หน่วยงาน child2 old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaOldId", table: "RetirementResignEmployeeCancels", type: "longtext", nullable: true, comment: "id หน่วยงาน child3 old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaOldId", table: "RetirementResignEmployeeCancels", type: "longtext", nullable: true, comment: "id หน่วยงาน child4 old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaOldId", table: "RetirementResignEmployeeCancels", type: "longtext", nullable: true, comment: "id หน่วยงาน root old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1DnaOldId", table: "RetirementResignCancels", type: "longtext", nullable: true, comment: "id หน่วยงาน child1 old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaOldId", table: "RetirementResignCancels", type: "longtext", nullable: true, comment: "id หน่วยงาน child2 old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaOldId", table: "RetirementResignCancels", type: "longtext", nullable: true, comment: "id หน่วยงาน child3 old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaOldId", table: "RetirementResignCancels", type: "longtext", nullable: true, comment: "id หน่วยงาน child4 old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaOldId", table: "RetirementResignCancels", type: "longtext", nullable: true, comment: "id หน่วยงาน root old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1DnaId", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "id หน่วยงาน child1 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1Id", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "id หน่วยงาน child1 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaId", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "id หน่วยงาน child2 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2Id", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "id หน่วยงาน child2 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaId", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "id หน่วยงาน child3 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3Id", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "id หน่วยงาน child3 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaId", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "id หน่วยงาน child4 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4Id", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "id หน่วยงาน child4 ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "root", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaId", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "id หน่วยงาน root ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootId", table: "RetirementQuestions", type: "longtext", nullable: true, comment: "id หน่วยงาน root ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "RetirementEmployeeQuestions", 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"), RetirementResignEmployeeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), ReasonWork = table.Column(type: "longtext", nullable: true, comment: "เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร") .Annotation("MySql:CharSet", "utf8mb4"), ReasonWorkOther = table.Column(type: "longtext", nullable: true, comment: "อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร") .Annotation("MySql:CharSet", "utf8mb4"), TimeThink = table.Column(type: "int", nullable: true, comment: "สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"), ExitFactor = table.Column(type: "longtext", nullable: true, comment: "ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ") .Annotation("MySql:CharSet", "utf8mb4"), ExitFactorOther = table.Column(type: "longtext", nullable: true, comment: "อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ") .Annotation("MySql:CharSet", "utf8mb4"), Adjust = table.Column(type: "longtext", nullable: true, comment: "อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง") .Annotation("MySql:CharSet", "utf8mb4"), AdjustOther = table.Column(type: "longtext", nullable: true, comment: "อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง") .Annotation("MySql:CharSet", "utf8mb4"), RealReason = table.Column(type: "longtext", nullable: true, comment: "โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร") .Annotation("MySql:CharSet", "utf8mb4"), NotExitFactor = table.Column(type: "longtext", nullable: true, comment: "ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร") .Annotation("MySql:CharSet", "utf8mb4"), Havejob = table.Column(type: "tinyint(1)", nullable: true, comment: "ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"), HavejobReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร") .Annotation("MySql:CharSet", "utf8mb4"), SuggestFriends = table.Column(type: "tinyint(1)", nullable: true, comment: "ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"), SuggestFriendsReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่") .Annotation("MySql:CharSet", "utf8mb4"), FutureWork = table.Column(type: "tinyint(1)", nullable: true, comment: "หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"), FutureWorkReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่") .Annotation("MySql:CharSet", "utf8mb4"), Suggestion = table.Column(type: "longtext", nullable: true, comment: "ความคิดเห็นและข้อเสนอแนะอื่น ๆ ") .Annotation("MySql:CharSet", "utf8mb4"), AppointDate = table.Column(type: "datetime(6)", nullable: true, comment: "กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"), Score1 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 1"), Score2 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 2"), Score3 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 3"), Score4 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 4"), Score5 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 5"), Score6 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 6"), Score7 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 7"), Score8 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 8"), Score9 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 9"), Score10 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 10"), ScoreTotal = table.Column(type: "int", nullable: true, comment: "คะแนนรวม"), Comment = table.Column(type: "longtext", nullable: true, comment: "ความคิดเห็น") .Annotation("MySql:CharSet", "utf8mb4"), root = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root ") .Annotation("MySql:CharSet", "utf8mb4"), rootId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน root ") .Annotation("MySql:CharSet", "utf8mb4"), rootDnaId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน root ") .Annotation("MySql:CharSet", "utf8mb4"), child1 = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1 ") .Annotation("MySql:CharSet", "utf8mb4"), child1Id = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child1 ") .Annotation("MySql:CharSet", "utf8mb4"), child1DnaId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child1 ") .Annotation("MySql:CharSet", "utf8mb4"), child2 = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2 ") .Annotation("MySql:CharSet", "utf8mb4"), child2Id = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child2 ") .Annotation("MySql:CharSet", "utf8mb4"), child2DnaId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child2 ") .Annotation("MySql:CharSet", "utf8mb4"), child3 = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3 ") .Annotation("MySql:CharSet", "utf8mb4"), child3Id = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child3 ") .Annotation("MySql:CharSet", "utf8mb4"), child3DnaId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child3 ") .Annotation("MySql:CharSet", "utf8mb4"), child4 = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4 ") .Annotation("MySql:CharSet", "utf8mb4"), child4Id = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child4 ") .Annotation("MySql:CharSet", "utf8mb4"), child4DnaId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child4 ") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_RetirementEmployeeQuestions", x => x.Id); table.ForeignKey( name: "FK_RetirementEmployeeQuestions_RetirementResignEmployees_Retire~", column: x => x.RetirementResignEmployeeId, principalTable: "RetirementResignEmployees", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( name: "IX_RetirementEmployeeQuestions_RetirementResignEmployeeId", table: "RetirementEmployeeQuestions", column: "RetirementResignEmployeeId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "RetirementEmployeeQuestions"); migrationBuilder.DropColumn( name: "child1DnaOldId", table: "RetirementResignEmployeeCancels"); migrationBuilder.DropColumn( name: "child2DnaOldId", table: "RetirementResignEmployeeCancels"); migrationBuilder.DropColumn( name: "child3DnaOldId", table: "RetirementResignEmployeeCancels"); migrationBuilder.DropColumn( name: "child4DnaOldId", table: "RetirementResignEmployeeCancels"); migrationBuilder.DropColumn( name: "rootDnaOldId", table: "RetirementResignEmployeeCancels"); migrationBuilder.DropColumn( name: "child1DnaOldId", table: "RetirementResignCancels"); migrationBuilder.DropColumn( name: "child2DnaOldId", table: "RetirementResignCancels"); migrationBuilder.DropColumn( name: "child3DnaOldId", table: "RetirementResignCancels"); migrationBuilder.DropColumn( name: "child4DnaOldId", table: "RetirementResignCancels"); migrationBuilder.DropColumn( name: "rootDnaOldId", table: "RetirementResignCancels"); migrationBuilder.DropColumn( name: "child1", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "child1DnaId", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "child1Id", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "child2", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "child2DnaId", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "child2Id", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "child3", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "child3DnaId", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "child3Id", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "child4", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "child4DnaId", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "child4Id", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "root", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "rootDnaId", table: "RetirementQuestions"); migrationBuilder.DropColumn( name: "rootId", table: "RetirementQuestions"); } } }