using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations.ApplicationDB { /// public partial class InitforOracle : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "CommandStatuses", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Name = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "สถานะของคำสั่ง"), Sequence = table.Column(type: "NUMBER(10)", nullable: false, comment: "ลำดับการทำงาน") }, constraints: table => { table.PrimaryKey("PK_CommandStatuses", x => x.Id); }); migrationBuilder.CreateTable( name: "CommandTypes", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Name = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อคำสั่ง"), Category = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "ประเภทคำสั่ง"), CommandCode = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "รหัสของประเภทคำสั่ง") }, constraints: table => { table.PrimaryKey("PK_CommandTypes", x => x.Id); }); migrationBuilder.CreateTable( name: "CronjobNotiProbations", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Subject = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "หัวเรื่อง"), Body = table.Column(type: "NCLOB", nullable: false, comment: "รายละเอียดข้อความ"), ReceiverUserId = table.Column(type: "RAW(16)", nullable: false, comment: "รหัสผู้รับข้อความ"), Payload = table.Column(type: "NCLOB", nullable: false, comment: "สิงที่แนบมาด้วย"), IsSendMail = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งอีเมล์หรือไม่?"), IsSendInbox = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งกล่องข้อความหรือไม่?"), IsSendNoti = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งการแจ้งเตือนหรือยัง"), ReceiveDate = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "วันที่ได้รับ") }, constraints: table => { table.PrimaryKey("PK_CronjobNotiProbations", x => x.Id); }); migrationBuilder.CreateTable( name: "DeploymentChannels", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), IsSendInbox = table.Column(type: "NUMBER(1)", nullable: false), IsSendEmail = table.Column(type: "NUMBER(1)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_DeploymentChannels", x => x.Id); }); migrationBuilder.CreateTable( name: "Inboxes", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Subject = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "หัวเรื่อง"), Body = table.Column(type: "NCLOB", nullable: false, comment: "รายละเอียดข้อความ"), ReceiverUserId = table.Column(type: "RAW(16)", nullable: false, comment: "รหัสผู้รับข้อความ"), Payload = table.Column(type: "NCLOB", nullable: false, comment: "สิงที่แนบมาด้วย"), IsOpen = table.Column(type: "NUMBER(1)", nullable: false, comment: "เปิดอ่านแล้วหรือยัง"), ReceiveDate = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "วันที่ได้รับ"), OpenDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่เปิดอ่าน"), DeleteDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่ลบข้อมูล") }, constraints: table => { table.PrimaryKey("PK_Inboxes", x => x.Id); }); migrationBuilder.CreateTable( name: "InsigniaManages", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), InsigniaId = table.Column(type: "RAW(16)", nullable: false), Year = table.Column(type: "NUMBER(10)", nullable: false, comment: "ปี"), Total = table.Column(type: "NUMBER(10)", nullable: false, comment: "จำนวนทั้งหมด") }, constraints: table => { table.PrimaryKey("PK_InsigniaManages", x => x.Id); table.ForeignKey( name: "FK_InsigniaManages_Insignias_InsigniaId", column: x => x.InsigniaId, principalTable: "Insignias", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "InsigniaNotes", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Name = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true), Year = table.Column(type: "NUMBER(10)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_InsigniaNotes", x => x.Id); }); migrationBuilder.CreateTable( name: "InsigniaPeriods", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Name = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true, comment: "ชื่อรอบเสนอขอเครื่องราชฯ"), Year = table.Column(type: "NUMBER(10)", nullable: false, comment: "ปี"), StartDate = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "วันที่เริ่ม"), EndDate = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "วันที่สิ้นสุด"), Amount = table.Column(type: "NUMBER(10)", maxLength: 50, nullable: false, comment: "จำนวนวันแจ้งเตือนล่วงหน้า"), Type = table.Column(type: "NVARCHAR2(10)", maxLength: 10, nullable: true, comment: "ประเภทการขอ"), ReliefDocId = table.Column(type: "RAW(16)", nullable: true), Round = table.Column(type: "NUMBER(10)", nullable: false, comment: "ราบการยื่นขอ"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน"), IsLock = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการ Freez ข้อมูล") }, constraints: table => { table.PrimaryKey("PK_InsigniaPeriods", x => x.Id); table.ForeignKey( name: "FK_InsigniaPeriods_Documents_ReliefDocId", column: x => x.ReliefDocId, principalTable: "Documents", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "MessageQueues", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), SenderSystem = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ส่งจากระบบงาน"), Subject = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "หัวเรื่อง"), MessageContent = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "รายละเอียดข้อความ"), MessagePayLoad = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สิ่งที่แนบมาด้วย"), ReceiverUserId = table.Column(type: "RAW(16)", nullable: false, comment: "รหัสของผู้รับข้อความ"), ReceiverEmailAddress = table.Column(type: "NVARCHAR2(500)", maxLength: 500, nullable: false, comment: "อีเมล์ของผู้รับ"), IsSendEmail = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งอีเมลล์หรือไม่?"), IsSendInbox = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งไปที่กล่องข้อความหรือไม่?"), IsSendNotification = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งการแจ้งเตือนหรือไม่?"), IsSend = table.Column(type: "NUMBER(1)", nullable: false, comment: "ทำการส่งข้อความแล้วหรือยัง?") }, constraints: table => { table.PrimaryKey("PK_MessageQueues", x => x.Id); }); migrationBuilder.CreateTable( name: "Notifications", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Body = table.Column(type: "NCLOB", nullable: false, comment: "รายละเอียดข้อความ"), ReceiverUserId = table.Column(type: "RAW(16)", nullable: false, comment: "รหัสผู้รับข้อความ"), Type = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ประเภทการแจ้งเตือน"), Payload = table.Column(type: "NCLOB", nullable: false, comment: "สิงที่แนบมาด้วย"), IsOpen = table.Column(type: "NUMBER(1)", nullable: false, comment: "เปิดอ่านแล้วหรือยัง"), ReceiveDate = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "วันที่ได้รับ"), OpenDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่เปิดอ่าน"), DeleteDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่ลบข้อมูล") }, constraints: table => { table.PrimaryKey("PK_Notifications", x => x.Id); }); migrationBuilder.CreateTable( name: "PlacementIsProperties", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Name = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อคุณสมบัติ"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน") }, constraints: table => { table.PrimaryKey("PK_PlacementIsProperties", x => x.Id); }); migrationBuilder.CreateTable( name: "PlacementOfficers", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผล"), PositionTypeOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"), PositionLevelOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ"), PositionNumberOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่"), AmountOld = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), OrganizationPositionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัด"), Organization = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หน่วยงานที่ช่วยราชการไป"), DateStart = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ตั้งแต่วันที่"), DateEnd = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ถึงวันที่"), profileId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "profile Id"), prefix = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำนำหน้า"), firstName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ"), lastName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "นามสกุล"), citizenId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เลขบัตรประชาชน"), root = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน root"), rootId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน root"), rootShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน root"), child1 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child1"), child1Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child1"), child1ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child1"), child2 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child2"), child2Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child2"), child2ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child2"), child3 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child3"), child3Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child3"), child3ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child3"), child4 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child4"), child4Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child4"), child4ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child4"), posMasterNo = table.Column(type: "NUMBER(10)", nullable: true, comment: "เลขที่ตำแหน่ง"), position = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อตำแหน่งในสายงาน"), posTypeId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ประเภทตำแหน่ง"), posTypeName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อประเภทตำแหน่ง"), posLevelId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ระดับตำแหน่ง"), posLevelName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อระดับตำแหน่ง"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะคำขอ"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน") }, constraints: table => { table.PrimaryKey("PK_PlacementOfficers", x => x.Id); }); migrationBuilder.CreateTable( name: "PlacementReceives", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), AvatarId = table.Column(type: "RAW(16)", nullable: true), DateOfBirth = table.Column(type: "TIMESTAMP(7)", maxLength: 40, nullable: false, comment: "วันเกิด"), GenderId = table.Column(type: "RAW(16)", nullable: true), Nationality = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "สัญชาติ"), Race = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "เชื้อชาติ"), ReligionId = table.Column(type: "RAW(16)", nullable: true), BloodGroupId = table.Column(type: "RAW(16)", nullable: true), RelationshipId = table.Column(type: "RAW(16)", nullable: true), TelephoneNumber = table.Column(type: "NVARCHAR2(50)", maxLength: 50, nullable: true, comment: "เบอร์โทร"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะคำขอ"), Amount = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "เงินเดือน"), RecruitDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่บรรจุ"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลที่รับโอนราชการ"), EducationOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "วุฒิ/สาขาเดิม"), OrganizationPositionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัดเดิม"), PositionTypeOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"), PositionLevelOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ"), PositionNumberOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่"), AmountOld = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), profileId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "profile Id"), prefix = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำนำหน้า"), firstName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ"), lastName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "นามสกุล"), citizenId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เลขบัตรประชาชน"), root = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน root"), rootId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน root"), rootShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน root"), child1 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child1"), child1Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child1"), child1ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child1"), child2 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child2"), child2Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child2"), child2ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child2"), child3 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child3"), child3Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child3"), child3ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child3"), child4 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child4"), child4Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child4"), child4ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child4"), node = table.Column(type: "NUMBER(10)", nullable: true, comment: "ระดับโครงสร้าง"), nodeId = table.Column(type: "RAW(16)", nullable: true, comment: "id โครงสร้าง"), posmasterId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id อัตรากำลัง"), orgRevisionId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id revision"), positionId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ตำแหน่ง"), positionField = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สายงาน"), posMasterNo = table.Column(type: "NUMBER(10)", nullable: true, comment: "เลขที่ตำแหน่ง"), positionName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อตำแหน่งในสายงาน"), posTypeId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ประเภทตำแหน่ง"), posTypeName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อประเภทตำแหน่ง"), posLevelId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ระดับตำแหน่ง"), posLevelName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อระดับตำแหน่ง"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน") }, constraints: table => { table.PrimaryKey("PK_PlacementReceives", x => x.Id); table.ForeignKey( name: "FK_PlacementReceives_BloodGroups_BloodGroupId", column: x => x.BloodGroupId, principalTable: "BloodGroups", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementReceives_Documents_AvatarId", column: x => x.AvatarId, principalTable: "Documents", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementReceives_Genders_GenderId", column: x => x.GenderId, principalTable: "Genders", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementReceives_Relationships_RelationshipId", column: x => x.RelationshipId, principalTable: "Relationships", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementReceives_Religions_ReligionId", column: x => x.ReligionId, principalTable: "Religions", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "PlacementRelocations", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), ProfileId = table.Column(type: "RAW(16)", nullable: false), CitizenId = table.Column(type: "NVARCHAR2(20)", maxLength: 20, nullable: false, comment: "เลขประจำตัวประชาชน"), PrefixId = table.Column(type: "RAW(16)", nullable: false), Firstname = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อ"), Lastname = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "นามสกุล"), DateOfBirth = table.Column(type: "TIMESTAMP(7)", maxLength: 40, nullable: false, comment: "วันเกิด"), GenderId = table.Column(type: "RAW(16)", nullable: true), Nationality = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "สัญชาติ"), Race = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "เชื้อชาติ"), ReligionId = table.Column(type: "RAW(16)", nullable: true), BloodGroupId = table.Column(type: "RAW(16)", nullable: true), RelationshipId = table.Column(type: "RAW(16)", nullable: true), TelephoneNumber = table.Column(type: "NVARCHAR2(50)", maxLength: 50, nullable: true, comment: "เบอร์โทร"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะคำขอ"), OrganizationPositionId = table.Column(type: "RAW(16)", nullable: true), Amount = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "เงินเดือน"), RecruitDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่บรรจุ"), PositionNumberId = table.Column(type: "RAW(16)", nullable: true), PositionPathId = table.Column(type: "RAW(16)", nullable: true), PositionPathSideId = table.Column(type: "RAW(16)", nullable: true), PositionTypeId = table.Column(type: "RAW(16)", nullable: true), PositionLineId = table.Column(type: "RAW(16)", nullable: true), PositionLevelId = table.Column(type: "RAW(16)", nullable: true), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลที่ย้ายราชการ"), EducationOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "วุฒิ/สาขาเดิม"), OrganizationPositionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัดเดิม"), PositionTypeOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"), PositionLevelOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ"), PositionNumberOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่"), AmountOld = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน") }, constraints: table => { table.PrimaryKey("PK_PlacementRelocations", x => x.Id); table.ForeignKey( name: "FK_PlacementRelocations_BloodGroups_BloodGroupId", column: x => x.BloodGroupId, principalTable: "BloodGroups", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementRelocations_Genders_GenderId", column: x => x.GenderId, principalTable: "Genders", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementRelocations_OrganizationPositions_OrganizationPositionId", column: x => x.OrganizationPositionId, principalTable: "OrganizationPositions", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementRelocations_PositionLevels_PositionLevelId", column: x => x.PositionLevelId, principalTable: "PositionLevels", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementRelocations_PositionLines_PositionLineId", column: x => x.PositionLineId, principalTable: "PositionLines", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementRelocations_PositionNumbers_PositionNumberId", column: x => x.PositionNumberId, principalTable: "PositionNumbers", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementRelocations_PositionPathSides_PositionPathSideId", column: x => x.PositionPathSideId, principalTable: "PositionPathSides", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementRelocations_PositionPaths_PositionPathId", column: x => x.PositionPathId, principalTable: "PositionPaths", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementRelocations_PositionTypes_PositionTypeId", column: x => x.PositionTypeId, principalTable: "PositionTypes", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementRelocations_Prefixes_PrefixId", column: x => x.PrefixId, principalTable: "Prefixes", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_PlacementRelocations_Profiles_ProfileId", column: x => x.ProfileId, principalTable: "Profiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_PlacementRelocations_Relationships_RelationshipId", column: x => x.RelationshipId, principalTable: "Relationships", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementRelocations_Religions_ReligionId", column: x => x.ReligionId, principalTable: "Religions", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "PlacementRepatriations", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Organization = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หน่วยงานที่ส่งตัวกลับไป"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผล"), OrganizationPositionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัด"), Date = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ตั้งแต่วันที่"), PositionTypeOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"), PositionLevelOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ"), PositionNumberOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่"), AmountOld = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะคำขอ"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน"), DateRepatriation = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ส่งตัวกลับตั้งแต่วันที่"), profileId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "profile Id"), prefix = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำนำหน้า"), firstName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ"), lastName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "นามสกุล"), citizenId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เลขบัตรประชาชน"), root = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน root"), rootId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน root"), rootShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน root"), child1 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child1"), child1Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child1"), child1ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child1"), child2 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child2"), child2Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child2"), child2ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child2"), child3 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child3"), child3Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child3"), child3ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child3"), child4 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child4"), child4Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child4"), child4ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child4"), posMasterNo = table.Column(type: "NUMBER(10)", nullable: true, comment: "เลขที่ตำแหน่ง"), position = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อตำแหน่งในสายงาน"), posTypeId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ประเภทตำแหน่ง"), posTypeName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อประเภทตำแหน่ง"), posLevelId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ระดับตำแหน่ง"), posLevelName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อระดับตำแหน่ง") }, constraints: table => { table.PrimaryKey("PK_PlacementRepatriations", x => x.Id); }); migrationBuilder.CreateTable( name: "PlacementTransfers", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), ProfileId = table.Column(type: "RAW(16)", nullable: false), Organization = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หน่วยงานที่ขอโอนไป"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผล"), OrganizationPositionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัด"), Date = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ตั้งแต่วันที่"), PositionTypeOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"), PositionLevelOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ"), PositionNumberOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่"), AmountOld = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะคำขอ"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน") }, constraints: table => { table.PrimaryKey("PK_PlacementTransfers", x => x.Id); table.ForeignKey( name: "FK_PlacementTransfers_Profiles_ProfileId", column: x => x.ProfileId, principalTable: "Profiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "PlacementTypes", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Name = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อประเภทบรรจุ"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน") }, constraints: table => { table.PrimaryKey("PK_PlacementTypes", x => x.Id); }); migrationBuilder.CreateTable( name: "RetirementDeceaseds", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), DocumentId = table.Column(type: "RAW(16)", nullable: true), DocumentForwardId = table.Column(type: "RAW(16)", nullable: true), Number = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เลขที่ใบมรณบัตร"), Date = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่เสียชีวิต"), Location = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สถานที่ออกใบมรณบัตร"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลการเสียชีวิต"), profileId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "profile Id"), prefix = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำนำหน้า"), firstName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ"), lastName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "นามสกุล"), citizenId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เลขบัตรประชาชน"), root = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน root"), rootId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน root"), rootShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน root"), child1 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child1"), child1Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child1"), child1ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child1"), child2 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child2"), child2Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child2"), child2ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child2"), child3 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child3"), child3Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child3"), child3ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child3"), child4 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child4"), child4Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child4"), child4ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child4"), posMasterNo = table.Column(type: "NUMBER(10)", nullable: true, comment: "เลขที่ตำแหน่ง"), position = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อตำแหน่งในสายงาน"), posTypeId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ประเภทตำแหน่ง"), posTypeName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อประเภทตำแหน่ง"), posLevelId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ระดับตำแหน่ง"), posLevelName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อระดับตำแหน่ง"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน") }, constraints: table => { table.PrimaryKey("PK_RetirementDeceaseds", x => x.Id); table.ForeignKey( name: "FK_RetirementDeceaseds_Documents_DocumentForwardId", column: x => x.DocumentForwardId, principalTable: "Documents", principalColumn: "Id"); table.ForeignKey( name: "FK_RetirementDeceaseds_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "RetirementDischarges", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), ProfileId = table.Column(type: "RAW(16)", nullable: false), Organization = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หน่วยงานที่ปลดออกไป"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผล"), OrganizationPositionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัด"), Date = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ตั้งแต่วันที่"), PositionTypeOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"), PositionLevelOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ"), PositionNumberOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่"), AmountOld = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะคำขอ"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน") }, constraints: table => { table.PrimaryKey("PK_RetirementDischarges", x => x.Id); table.ForeignKey( name: "FK_RetirementDischarges_Profiles_ProfileId", column: x => x.ProfileId, principalTable: "Profiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "RetirementExpulsions", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), ProfileId = table.Column(type: "RAW(16)", nullable: false), Organization = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หน่วยงานที่ไล่ออกไป"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผล"), OrganizationPositionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัด"), Date = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ตั้งแต่วันที่"), PositionTypeOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"), PositionLevelOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ"), PositionNumberOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่"), AmountOld = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะคำขอ"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน") }, constraints: table => { table.PrimaryKey("PK_RetirementExpulsions", x => x.Id); table.ForeignKey( name: "FK_RetirementExpulsions_Profiles_ProfileId", column: x => x.ProfileId, principalTable: "Profiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "RetirementOuts", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Organization = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หน่วยงานที่ให้ออกไป"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผล"), OrganizationPositionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัด"), Date = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ตั้งแต่วันที่"), PositionTypeOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"), PositionLevelOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ"), PositionNumberOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่"), AmountOld = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะคำขอ"), profileId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "profile Id"), prefix = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำนำหน้า"), firstName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ"), lastName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "นามสกุล"), citizenId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เลขบัตรประชาชน"), root = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน root"), rootId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน root"), rootShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน root"), child1 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child1"), child1Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child1"), child1ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child1"), child2 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child2"), child2Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child2"), child2ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child2"), child3 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child3"), child3Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child3"), child3ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child3"), child4 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child4"), child4Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child4"), child4ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child4"), posMasterNo = table.Column(type: "NUMBER(10)", nullable: true, comment: "เลขที่ตำแหน่ง"), position = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อตำแหน่งในสายงาน"), posTypeId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ประเภทตำแหน่ง"), posTypeName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อประเภทตำแหน่ง"), posLevelId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ระดับตำแหน่ง"), posLevelName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อระดับตำแหน่ง"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน") }, constraints: table => { table.PrimaryKey("PK_RetirementOuts", x => x.Id); }); migrationBuilder.CreateTable( name: "RetirementPeriods", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Round = table.Column(type: "NUMBER(10)", nullable: false, comment: "ครั้งที่"), SignDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ประกาศ ณ วันที่"), TypeReport = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ประเภทคำสั่ง"), Year = table.Column(type: "NUMBER(10)", nullable: false, comment: "ปีงบประมาณ"), Type = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ประเภท"), DocumentId = table.Column(type: "RAW(16)", nullable: true), Detail = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "รายละเอียดมติ อกก") }, constraints: table => { table.PrimaryKey("PK_RetirementPeriods", x => x.Id); table.ForeignKey( name: "FK_RetirementPeriods_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "RetirementQuestionnaireQuestions", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Question1Desc = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำถามข้อที่ 1"), Question1Score = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำตอบข้อที่ 1"), Question1Answer = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรอกคะแนน 1"), Question2Desc = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำถามข้อที่ 2"), Question2Score = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำตอบข้อที่ 2"), Question2Answer = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรอกคะแนน 2"), Question3Desc = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำถามข้อที่ 3"), Question3Score = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำตอบข้อที่ 3"), Question3Answer = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรอกคะแนน 3"), Question4Desc = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำถามข้อที่ 4"), Question4Score = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำตอบข้อที่ 4"), Question4Answer = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรอกคะแนน 4"), Question5Desc = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำถามข้อที่ 5"), Question5Score = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำตอบข้อที่ 5"), Question5Answer = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรอกคะแนน 5"), Question6Desc = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำถามข้อที่ 6"), Question6Score = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำตอบข้อที่ 6"), Question6Answer = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรอกคะแนน 6"), Question7Desc = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำถามข้อที่ 7"), Question7Score = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำตอบข้อที่ 7"), Question7Answer = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรอกคะแนน 7"), Question8Desc = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำถามข้อที่ 8"), Question8Score = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำตอบข้อที่ 8"), Question8Answer = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรอกคะแนน 8"), Question9Desc = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำถามข้อที่ 9"), Question9Score = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำตอบข้อที่ 9"), Question9Answer = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรอกคะแนน 9"), Question10Desc = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำถามข้อที่ 10"), Question10Score = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำตอบข้อที่ 10"), Question10Answer = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรอกคะแนน 10") }, constraints: table => { table.PrimaryKey("PK_RetirementQuestionnaireQuestions", x => x.Id); }); migrationBuilder.CreateTable( name: "RetirementResigns", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Location = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สถานที่ยื่นขอลาออกราชการ"), SendDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่ยื่นขอออกราชการ"), ActiveDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่ขอออกราชการ"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลที่ลาออกจากราชการ"), ProfileId = table.Column(type: "RAW(16)", nullable: false), OrganizationPositionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัด"), PositionTypeOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"), PositionLevelOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ"), PositionNumberOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่"), AmountOld = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สถานะลาออก"), ApproveReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลอนุมัติ"), RejectReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลไม่อนุมัติ"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน"), OligarchReject = table.Column(type: "NUMBER(1)", nullable: true, comment: "สถานะยับยั้งผู้ดูแล"), OligarchApproveReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลอนุมัติผู้ดูแล"), OligarchRejectReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลยับยั้งผู้ดูแล"), OligarchRejectDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่ยับยั้งผู้ดูแล"), CommanderReject = table.Column(type: "NUMBER(1)", nullable: true, comment: "สถานะยับยั้งผู้บังคับบัญชา"), CommanderApproveReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลอนุมัติผู้บังคับบัญชา"), CommanderRejectReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลยับยั้งผู้บังคับบัญชา"), CommanderRejectDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่ยับยั้งผู้บังคับบัญชา"), RemarkHorizontal = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หมายเหตุแนวนอน") }, constraints: table => { table.PrimaryKey("PK_RetirementResigns", x => x.Id); table.ForeignKey( name: "FK_RetirementResigns_Profiles_ProfileId", column: x => x.ProfileId, principalTable: "Profiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "PlacementAppointments", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะคำขอ"), RecruitDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่บรรจุ"), type = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ประเภทราชการ"), Amount = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "เงินเดือน"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลที่รับย้ายราชการ"), EducationOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "วุฒิ/สาขาเดิม"), OrganizationPositionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัดเดิม"), PositionTypeOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"), PositionLevelOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ"), PositionNumberOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่"), AmountOld = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน"), CommandTypeId = table.Column(type: "RAW(16)", nullable: true), PositionDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"), profileId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "profile Id"), prefix = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำนำหน้า"), firstName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ"), lastName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "นามสกุล"), citizenId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เลขบัตรประชาชน"), root = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน root"), rootId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน root"), rootShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน root"), child1 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child1"), child1Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child1"), child1ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child1"), child2 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child2"), child2Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child2"), child2ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child2"), child3 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child3"), child3Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child3"), child3ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child3"), child4 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child4"), child4Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child4"), child4ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child4"), node = table.Column(type: "NUMBER(10)", nullable: true, comment: "ระดับโครงสร้าง"), nodeId = table.Column(type: "RAW(16)", nullable: true, comment: "id โครงสร้าง"), posmasterId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id อัตรากำลัง"), orgRevisionId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id revision"), positionId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ตำแหน่ง"), positionField = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สายงาน"), posMasterNo = table.Column(type: "NUMBER(10)", nullable: true, comment: "เลขที่ตำแหน่ง"), positionName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อตำแหน่งในสายงาน"), posTypeId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ประเภทตำแหน่ง"), posTypeName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อประเภทตำแหน่ง"), posLevelId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ระดับตำแหน่ง"), posLevelName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อระดับตำแหน่ง"), rootOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน root old"), rootOldId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน root old"), rootShortNameOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน root old"), child1Old = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child1 old"), child1OldId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child1 old"), child1ShortNameOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child1 old"), child2Old = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child2 old"), child2OldId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child2 old"), child2ShortNameOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child2 old"), child3Old = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child3 old"), child3OldId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child3 old"), child3ShortNameOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child3 old"), child4Old = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child4 old"), child4OldId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child4 old"), child4ShortNameOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child4 old"), posMasterNoOld = table.Column(type: "NUMBER(10)", nullable: true, comment: "เลขที่ตำแหน่ง old"), positionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อตำแหน่งในสายงาน old"), posTypeOldId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ประเภทตำแหน่ง old"), posTypeNameOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อประเภทตำแหน่ง old"), posLevelOldId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ระดับตำแหน่ง old"), posLevelNameOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อระดับตำแหน่ง old") }, constraints: table => { table.PrimaryKey("PK_PlacementAppointments", x => x.Id); table.ForeignKey( name: "FK_PlacementAppointments_CommandTypes_CommandTypeId", column: x => x.CommandTypeId, principalTable: "CommandTypes", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "RetirementOthers", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะคำขอ"), RecruitDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่บรรจุ"), Amount = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "เงินเดือน"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลที่รับย้ายราชการ"), EducationOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "วุฒิ/สาขาเดิม"), OrganizationPositionOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัดเดิม"), PositionTypeOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"), PositionLevelOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม ระดับ"), PositionNumberOld = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่"), AmountOld = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน"), CommandTypeId = table.Column(type: "RAW(16)", nullable: true), PositionDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"), MilitaryDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่พ้นจากราชการทหาร"), profileId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "profile Id"), prefix = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำนำหน้า"), firstName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ"), lastName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "นามสกุล"), citizenId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เลขบัตรประชาชน"), root = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน root"), rootId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน root"), rootShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน root"), child1 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child1"), child1Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child1"), child1ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child1"), child2 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child2"), child2Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child2"), child2ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child2"), child3 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child3"), child3Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child3"), child3ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child3"), child4 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child4"), child4Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child4"), child4ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child4"), posMasterNo = table.Column(type: "NUMBER(10)", nullable: true, comment: "เลขที่ตำแหน่ง"), position = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อตำแหน่งในสายงาน"), posTypeId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ประเภทตำแหน่ง"), posTypeName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อประเภทตำแหน่ง"), posLevelId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ระดับตำแหน่ง"), posLevelName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อระดับตำแหน่ง") }, constraints: table => { table.PrimaryKey("PK_RetirementOthers", x => x.Id); table.ForeignKey( name: "FK_RetirementOthers_CommandTypes_CommandTypeId", column: x => x.CommandTypeId, principalTable: "CommandTypes", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "InsigniaManageOrganiations", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Total = table.Column(type: "NUMBER(10)", nullable: false, comment: "จำนวนทั้งหมด"), OrganizationOrganizationId = table.Column(type: "RAW(16)", nullable: false), InsigniaManageId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_InsigniaManageOrganiations", x => x.Id); table.ForeignKey( name: "FK_InsigniaManageOrganiations_InsigniaManages_InsigniaManageId", column: x => x.InsigniaManageId, principalTable: "InsigniaManages", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_InsigniaManageOrganiations_OrganizationOrganizations_OrganizationOrganizationId", column: x => x.OrganizationOrganizationId, principalTable: "OrganizationOrganizations", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "InsigniaNoteDocs", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), DocumentId = table.Column(type: "RAW(16)", nullable: false), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หมายเหตุ"), InsigniaNoteId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_InsigniaNoteDocs", x => x.Id); table.ForeignKey( name: "FK_InsigniaNoteDocs_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_InsigniaNoteDocs_InsigniaNotes_InsigniaNoteId", column: x => x.InsigniaNoteId, principalTable: "InsigniaNotes", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "InsigniaNoteProfiles", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), RequestDate = table.Column(type: "TIMESTAMP(7)", nullable: true), Salary = table.Column(type: "BINARY_DOUBLE", nullable: true), IsApprove = table.Column(type: "NUMBER(1)", nullable: false), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะตำแหน่งที่ยื่นขอ"), Number = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"), DateReceive = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่ได้รับพระราชทานเครื่องราชฯ"), OrganizationOrganizationSend = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"), OrganizationOrganizationReceive = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"), Date = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่"), VolumeNo = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เล่มที่"), Section = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ตอนที่"), Page = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หน้าที่"), No = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ลำดับที่"), DatePayment = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่จ่ายใบกำกับ"), TypePayment = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "รูปแบบการจ่าย"), Address = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ที่อยู่ที่จ่าย"), Issue = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ทะเบียนฐานันดร"), DateReceiveInsignia = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่รับเครื่องราชฯ"), DocReceiveInsigniaId = table.Column(type: "RAW(16)", nullable: true), OrgReceiveInsigniaId = table.Column(type: "RAW(16)", nullable: true), DateReturnInsignia = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่คืนเครื่องราชฯ"), DocReturnInsigniaId = table.Column(type: "RAW(16)", nullable: true), OrgReturnInsigniaId = table.Column(type: "RAW(16)", nullable: true), ProfileId = table.Column(type: "RAW(16)", nullable: false), RequestInsigniaId = table.Column(type: "RAW(16)", nullable: false), InsigniaNoteId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_InsigniaNoteProfiles", x => x.Id); table.ForeignKey( name: "FK_InsigniaNoteProfiles_Documents_DocReceiveInsigniaId", column: x => x.DocReceiveInsigniaId, principalTable: "Documents", principalColumn: "Id"); table.ForeignKey( name: "FK_InsigniaNoteProfiles_Documents_DocReturnInsigniaId", column: x => x.DocReturnInsigniaId, principalTable: "Documents", principalColumn: "Id"); table.ForeignKey( name: "FK_InsigniaNoteProfiles_InsigniaNotes_InsigniaNoteId", column: x => x.InsigniaNoteId, principalTable: "InsigniaNotes", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_InsigniaNoteProfiles_Insignias_RequestInsigniaId", column: x => x.RequestInsigniaId, principalTable: "Insignias", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_InsigniaNoteProfiles_Organizations_OrgReceiveInsigniaId", column: x => x.OrgReceiveInsigniaId, principalTable: "Organizations", principalColumn: "Id"); table.ForeignKey( name: "FK_InsigniaNoteProfiles_Organizations_OrgReturnInsigniaId", column: x => x.OrgReturnInsigniaId, principalTable: "Organizations", principalColumn: "Id"); table.ForeignKey( name: "FK_InsigniaNoteProfiles_Profiles_ProfileId", column: x => x.ProfileId, principalTable: "Profiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "InsigniaRequests", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), RequestStatus = table.Column(type: "NVARCHAR2(50)", maxLength: 50, nullable: false), RequestNote = table.Column(type: "NCLOB", nullable: false), PeriodId = table.Column(type: "RAW(16)", nullable: false), OrganizationId = table.Column(type: "RAW(16)", nullable: false), DocumentId = table.Column(type: "RAW(16)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_InsigniaRequests", x => x.Id); table.ForeignKey( name: "FK_InsigniaRequests_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id"); table.ForeignKey( name: "FK_InsigniaRequests_InsigniaPeriods_PeriodId", column: x => x.PeriodId, principalTable: "InsigniaPeriods", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_InsigniaRequests_Organizations_OrganizationId", column: x => x.OrganizationId, principalTable: "Organizations", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "PlacementReceiveDocs", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), DocumentId = table.Column(type: "RAW(16)", nullable: false), PlacementReceiveId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_PlacementReceiveDocs", x => x.Id); table.ForeignKey( name: "FK_PlacementReceiveDocs_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_PlacementReceiveDocs_PlacementReceives_PlacementReceiveId", column: x => x.PlacementReceiveId, principalTable: "PlacementReceives", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "PlacementRelocationDocs", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), DocumentId = table.Column(type: "RAW(16)", nullable: false), PlacementRelocationId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_PlacementRelocationDocs", x => x.Id); table.ForeignKey( name: "FK_PlacementRelocationDocs_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_PlacementRelocationDocs_PlacementRelocations_PlacementRelocationId", column: x => x.PlacementRelocationId, principalTable: "PlacementRelocations", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "PlacementTransferDocs", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), DocumentId = table.Column(type: "RAW(16)", nullable: false), PlacementTransferId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_PlacementTransferDocs", x => x.Id); table.ForeignKey( name: "FK_PlacementTransferDocs_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_PlacementTransferDocs_PlacementTransfers_PlacementTransferId", column: x => x.PlacementTransferId, principalTable: "PlacementTransfers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "Placements", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Name = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "รอบการสอบ"), Round = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ครั้งที่"), Year = table.Column(type: "NUMBER(10)", maxLength: 5, nullable: false, comment: "ปีงบประมาณ"), Number = table.Column(type: "NUMBER(10)", maxLength: 10, nullable: false, comment: "จำนวนผู้สอบได้"), PlacementTypeId = table.Column(type: "RAW(16)", nullable: false), StartDate = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "วันที่เริ่มบัญชีบัญชี"), EndDate = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "วันที่สิ้นสุดบัญชี"), IsActive = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการใช้งาน") }, constraints: table => { table.PrimaryKey("PK_Placements", x => x.Id); table.ForeignKey( name: "FK_Placements_PlacementTypes_PlacementTypeId", column: x => x.PlacementTypeId, principalTable: "PlacementTypes", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "RetirementDeceasedNotis", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), ReceiveUserId = table.Column(type: "RAW(16)", nullable: false), RetirementDeceasedId = table.Column(type: "RAW(16)", nullable: false), CitizenId = table.Column(type: "NVARCHAR2(13)", maxLength: 13, nullable: false, comment: "เลขประจำตัวประชาชน"), Prefix = table.Column(type: "NVARCHAR2(50)", maxLength: 50, nullable: false, comment: "คำนำหน้านาม"), FirstName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "ชื่อ"), LastName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "นามสกุล"), IsSendMail = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งอีเมล์หรือไม่?"), IsSendInbox = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งกล่องข้อความหรือไม่?"), IsSendNotification = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งแจ้งเตือนหรือไม่?"), OrganizationName = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"), PositionName = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"), DocumentId = table.Column(type: "RAW(16)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_RetirementDeceasedNotis", x => x.Id); table.ForeignKey( name: "FK_RetirementDeceasedNotis_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id"); table.ForeignKey( name: "FK_RetirementDeceasedNotis_Profiles_ReceiveUserId", column: x => x.ReceiveUserId, principalTable: "Profiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_RetirementDeceasedNotis_RetirementDeceaseds_RetirementDeceasedId", column: x => x.RetirementDeceasedId, principalTable: "RetirementDeceaseds", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "RetirementPeriodHistorys", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Round = table.Column(type: "NUMBER(10)", nullable: false, comment: "ครั้งที่"), SignDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ประกาศ ณ วันที่"), TypeReport = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ประเภทคำสั่ง"), Year = table.Column(type: "NUMBER(10)", nullable: false, comment: "ปีงบประมาณ"), Total = table.Column(type: "NUMBER(10)", nullable: false, comment: "จำนวนคน"), Type = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ประเภท"), ProfileFile = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "รายชื่อเกษียญ"), DocumentId = table.Column(type: "RAW(16)", nullable: true), Detail = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "รายละเอียดมติ อกก"), RetirementPeriodId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_RetirementPeriodHistorys", x => x.Id); table.ForeignKey( name: "FK_RetirementPeriodHistorys_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id"); table.ForeignKey( name: "FK_RetirementPeriodHistorys_RetirementPeriods_RetirementPeriodId", column: x => x.RetirementPeriodId, principalTable: "RetirementPeriods", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "RetirementProfiles", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Order = table.Column(type: "NUMBER(10)", nullable: false, comment: "ลำดับที่"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "เหตุผล"), Remove = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ลบออกจากเกษียญ"), RetirementPeriodId = table.Column(type: "RAW(16)", nullable: false), ProfileId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_RetirementProfiles", x => x.Id); table.ForeignKey( name: "FK_RetirementProfiles_Profiles_ProfileId", column: x => x.ProfileId, principalTable: "Profiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_RetirementProfiles_RetirementPeriods_RetirementPeriodId", column: x => x.RetirementPeriodId, principalTable: "RetirementPeriods", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "RetirementQuestions", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), RetirementResignId = table.Column(type: "RAW(16)", nullable: false), ReasonWork = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"), ReasonWorkOther = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"), TimeThink = table.Column(type: "NUMBER(10)", nullable: true, comment: "สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"), ExitFactor = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"), ExitFactorOther = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"), Adjust = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"), AdjustOther = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"), RealReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"), NotExitFactor = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"), Havejob = table.Column(type: "NUMBER(1)", nullable: true, comment: "ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"), HavejobReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"), SuggestFriends = table.Column(type: "NUMBER(1)", nullable: true, comment: "ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"), SuggestFriendsReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"), FutureWork = table.Column(type: "NUMBER(1)", nullable: true, comment: "หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"), FutureWorkReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"), Suggestion = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ความคิดเห็นและข้อเสนอแนะอื่น ๆ "), AppointDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"), Score1 = table.Column(type: "NUMBER(10)", nullable: true, comment: "คะแนนข้อ 1"), Score2 = table.Column(type: "NUMBER(10)", nullable: true, comment: "คะแนนข้อ 2"), Score3 = table.Column(type: "NUMBER(10)", nullable: true, comment: "คะแนนข้อ 3"), Score4 = table.Column(type: "NUMBER(10)", nullable: true, comment: "คะแนนข้อ 4"), Score5 = table.Column(type: "NUMBER(10)", nullable: true, comment: "คะแนนข้อ 5"), Score6 = table.Column(type: "NUMBER(10)", nullable: true, comment: "คะแนนข้อ 6"), Score7 = table.Column(type: "NUMBER(10)", nullable: true, comment: "คะแนนข้อ 7"), Score8 = table.Column(type: "NUMBER(10)", nullable: true, comment: "คะแนนข้อ 8"), Score9 = table.Column(type: "NUMBER(10)", nullable: true, comment: "คะแนนข้อ 9"), Score10 = table.Column(type: "NUMBER(10)", nullable: true, comment: "คะแนนข้อ 10"), ScoreTotal = table.Column(type: "NUMBER(10)", nullable: true, comment: "คะแนนรวม"), Comment = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ความคิดเห็น") }, constraints: table => { table.PrimaryKey("PK_RetirementQuestions", x => x.Id); table.ForeignKey( name: "FK_RetirementQuestions_RetirementResigns_RetirementResignId", column: x => x.RetirementResignId, principalTable: "RetirementResigns", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "RetirementResignDocs", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), DocumentId = table.Column(type: "RAW(16)", nullable: false), RetirementResignId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_RetirementResignDocs", x => x.Id); table.ForeignKey( name: "FK_RetirementResignDocs_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_RetirementResignDocs_RetirementResigns_RetirementResignId", column: x => x.RetirementResignId, principalTable: "RetirementResigns", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "PlacementAppointmentDocs", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), DocumentId = table.Column(type: "RAW(16)", nullable: false), PlacementAppointmentId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_PlacementAppointmentDocs", x => x.Id); table.ForeignKey( name: "FK_PlacementAppointmentDocs_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_PlacementAppointmentDocs_PlacementAppointments_PlacementAppointmentId", column: x => x.PlacementAppointmentId, principalTable: "PlacementAppointments", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "RetirementOtherDocs", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), DocumentId = table.Column(type: "RAW(16)", nullable: false), RetirementOtherId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_RetirementOtherDocs", x => x.Id); table.ForeignKey( name: "FK_RetirementOtherDocs_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_RetirementOtherDocs_RetirementOthers_RetirementOtherId", column: x => x.RetirementOtherId, principalTable: "RetirementOthers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "InsigniaManageProfiles", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Status = table.Column(type: "NUMBER(1)", nullable: false, comment: "สถานะการคืน"), BorrowDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ยืมวันที่"), BorrowOrganizationId = table.Column(type: "RAW(16)", nullable: true), ReturnDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "คืนวันที่"), ReturnOrganizationId = table.Column(type: "RAW(16)", nullable: true), ReturnReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลคืน"), InsigniaNoteProfileId = table.Column(type: "RAW(16)", nullable: false), InsigniaManageOrganiationId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_InsigniaManageProfiles", x => x.Id); table.ForeignKey( name: "FK_InsigniaManageProfiles_InsigniaManageOrganiations_InsigniaManageOrganiationId", column: x => x.InsigniaManageOrganiationId, principalTable: "InsigniaManageOrganiations", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_InsigniaManageProfiles_InsigniaNoteProfiles_InsigniaNoteProfileId", column: x => x.InsigniaNoteProfileId, principalTable: "InsigniaNoteProfiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_InsigniaManageProfiles_OrganizationOrganizations_BorrowOrganizationId", column: x => x.BorrowOrganizationId, principalTable: "OrganizationOrganizations", principalColumn: "Id"); table.ForeignKey( name: "FK_InsigniaManageProfiles_OrganizationOrganizations_ReturnOrganizationId", column: x => x.ReturnOrganizationId, principalTable: "OrganizationOrganizations", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "InsigniaRequestProfiles", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), RequestDate = table.Column(type: "TIMESTAMP(7)", nullable: false), Salary = table.Column(type: "BINARY_DOUBLE", nullable: true), IsApprove = table.Column(type: "NUMBER(1)", nullable: false), MatchingConditions = table.Column(type: "NCLOB", nullable: true, comment: "รายละเอียดเครื่องราชฯที่ขอ"), Status = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะตำแหน่งที่ยื่นขอ"), ReasonReject = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลไม่ยื่นขอ"), Reason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลการได้รับเครื่องราชฯ"), MarkDiscipline = table.Column(type: "NUMBER(1)", nullable: true, comment: "แจ้งเตือน มีโทษทางวินัย"), MarkLeave = table.Column(type: "NUMBER(1)", nullable: true, comment: "แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"), MarkRate = table.Column(type: "NUMBER(1)", nullable: true, comment: "แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"), ProfileId = table.Column(type: "RAW(16)", nullable: false), RequestInsigniaId = table.Column(type: "RAW(16)", nullable: false), RequestId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_InsigniaRequestProfiles", x => x.Id); table.ForeignKey( name: "FK_InsigniaRequestProfiles_InsigniaRequests_RequestId", column: x => x.RequestId, principalTable: "InsigniaRequests", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_InsigniaRequestProfiles_Insignias_RequestInsigniaId", column: x => x.RequestInsigniaId, principalTable: "Insignias", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_InsigniaRequestProfiles_Profiles_ProfileId", column: x => x.ProfileId, principalTable: "Profiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "Commands", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), CommandNo = table.Column(type: "NVARCHAR2(10)", maxLength: 10, nullable: false, comment: "เลขที่คำสั่ง"), CommandYear = table.Column(type: "NVARCHAR2(4)", maxLength: 4, nullable: false, comment: "ปีที่ออกคำสั่ง"), CommandTypeId = table.Column(type: "RAW(16)", nullable: false, comment: "รหัสอ้างอิงประเภทคำสั่ง"), IssuerOrganizationId = table.Column(type: "RAW(16)", nullable: false, comment: "รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"), IssuerOrganizationName = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "หน่วยงานที่ออกคำสั่ง"), CommandStatusId = table.Column(type: "RAW(16)", nullable: false, comment: "รหัสอ้างอิงสถานะคำสั่ง"), AuthorizedUserId = table.Column(type: "RAW(16)", nullable: false, comment: "รหัสอ้างอิงผู้มีอำนาจลงนาม"), AuthorizedUserFullName = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อผู้มีอำนาจลงนาม"), AuthorizedPosition = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ตำแหน่งผู้มีอำนาจลงนาม"), CommandAffectDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่คำสั่งมีผล"), CommandExcecuteDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่ออกคำสั่ง"), CommandSubject = table.Column(type: "NVARCHAR2(500)", maxLength: 500, nullable: false, comment: "คำสั่งเรื่อง"), PlacementId = table.Column(type: "RAW(16)", nullable: true, comment: "อ้างอิงรอบการสอบ"), PositionName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ตำแหน่งที่บรรจุ"), ConclusionRegisterNo = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"), ConclusionRegisterDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ลงวันที่ (เรื่อง รับสมัครสอบฯ)"), ConclusionResultNo = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"), ConclusionResultDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"), ConclusionMeetingNo = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "การประชุม ครั้งที่"), ConclusionMeetingDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "การประชุม ลงวันที่"), ConclusionReturnNo = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"), ConclusionReturnDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"), SourceOrganizationName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"), MilitaryCommandNo = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำสั่งที่ (ให้เข้ารับราชการทหาร)"), MilitaryCommanDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ลงวันที่ (ให้เข้ารับราชการทหาร)"), PlacementCommandIssuer = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หน่วยงานที่ออกคำสั่งบรรจุ"), PlacementCommandNo = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เลขที่คำสั่งบรรจุ"), PlacementCommandDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "คำสั่งบรรจุลงวันที่"), PlacementPositionName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ตำแหน่งที่บรรจุ"), PlacementOrganizationName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สังกัดที่บรรจุ"), ProbationStartDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่เริ่มทดลองปฏิบัติราชการ"), ProbationEndDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่สิ้นสุดการทดลองปฏิบัติราชการ"), ChairManFullName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ประธานคณะกรรมการ"), Member1FullName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรรมการคนที่ 1"), Member2FullName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรรมการคนที่ 2"), ReceiveOrganizationName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ส่วนราชการที่รับโอน"), TransferOrganizationName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ส่วนราชการที่ให้โอน"), ConclusionReceiveNo = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "มติ กก. ครั้งที่ (การรับโอน)"), ConclusionReceiveDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ลงวันที่ (การรับโอน)"), GovAidCommandNo = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "คำสั่งเลขที่ (คำสั่งช่วยราชการ)"), GovAidCommandDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ลงวันที่ (คำสั่งช่วยราชการ)"), Fault = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "รายละเอียดการกระทำผิด"), GuiltyBasis = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ฐานความผิด"), ConclusionFireNo = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ครั้งที่ (เรื่องการดำเนินการทางวินัย)"), ConclusionFireDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ลงวันที่ (เรื่องการดำเนินการทางวินัย)"), ConclusionFireResolution = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"), ConclusionTranferNo = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "การประชุม ครั้งที่"), ConclusionTranferDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "การประชุม ลงวันที่"), FaultLevel = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ระดับความผิด"), CaseFault = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "กรณีความผิด"), Result = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ผลดำเนินการพิจารณา"), RefRaw = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "อ้างอิงมาตราตามกฏหมาย"), ComplaintId = table.Column(type: "RAW(16)", nullable: true, comment: "Id เรื่องร้องเรียน"), SalaryPeriodId = table.Column(type: "RAW(16)", nullable: true, comment: "Id เรื่องเงินเดือน"), Year = table.Column(type: "NVARCHAR2(4)", maxLength: 4, nullable: true, comment: "ปีรอบเงินเดือน"), SalaryPeriod = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "รอบเงินเดือน"), OwnerGovId = table.Column(type: "RAW(16)", nullable: false, comment: "รหัสส่วนราชการผู้ออกคำสั่ง") }, constraints: table => { table.PrimaryKey("PK_Commands", x => x.Id); table.ForeignKey( name: "FK_Commands_CommandStatuses_CommandStatusId", column: x => x.CommandStatusId, principalTable: "CommandStatuses", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_Commands_CommandTypes_CommandTypeId", column: x => x.CommandTypeId, principalTable: "CommandTypes", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_Commands_Placements_PlacementId", column: x => x.PlacementId, principalTable: "Placements", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "PlacementProfiles", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), PlacementId = table.Column(type: "RAW(16)", nullable: true), PrefixId = table.Column(type: "RAW(16)", nullable: true), Firstname = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อ"), Lastname = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "นามสกุล"), GenderId = table.Column(type: "RAW(16)", nullable: true), PositionCandidateId = table.Column(type: "RAW(16)", nullable: true), OrganizationPositionId = table.Column(type: "RAW(16)", nullable: true), RecruitDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่บรรจุ"), ReportingDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่รายงานตัว"), Amount = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "เงินเดือน"), PositionSalaryAmount = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "เงินประจำตำแหน่ง"), MouthSalaryAmount = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "เงินค่าตอบแทนรายเดือน"), SalaryClass = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ตำแหน่ง (รายละเอียด)"), SalaryRef = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เอกสารอ้างอิง"), IsOfficer = table.Column(type: "NUMBER(1)", nullable: true, comment: "ข้าราชการฯ กทม."), PlacementStatus = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "สถานะการบรรจุ"), RejectReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลสละสิทธิ์"), IsRelief = table.Column(type: "NUMBER(1)", nullable: false, comment: "ผ่อนผัน"), ReliefReason = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "เหตุผลผ่อนผัน"), ReliefDocId = table.Column(type: "RAW(16)", nullable: true), IsProperty = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "การคัดกรองคุณสมบัติ"), Nationality = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: true, comment: "สัญชาติ"), Race = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: true, comment: "เชื้อชาติ"), DateOfBirth = table.Column(type: "TIMESTAMP(7)", maxLength: 40, nullable: true, comment: "วันเกิด"), RelationshipId = table.Column(type: "RAW(16)", nullable: true), BloodGroupId = table.Column(type: "RAW(16)", nullable: true), ReligionId = table.Column(type: "RAW(16)", nullable: true), Email = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true, comment: "อีเมล"), CitizenId = table.Column(type: "NVARCHAR2(20)", maxLength: 20, nullable: true, comment: "เลขประจำตัวประชาชน"), CitizenDistrictId = table.Column(type: "RAW(16)", nullable: true), CitizenProvinceId = table.Column(type: "RAW(16)", nullable: true), CitizenDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่ออกบัตร"), Telephone = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true, comment: "โทรศัพท์"), MobilePhone = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true, comment: "โทรศัพท์มือถือ"), Knowledge = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ความสามารถพิเศษ"), RegistAddress = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ที่อยู่ตามทะเบียนบ้าน"), RegistProvinceId = table.Column(type: "RAW(16)", nullable: true), RegistDistrictId = table.Column(type: "RAW(16)", nullable: true), RegistSubDistrictId = table.Column(type: "RAW(16)", nullable: true), RegistZipCode = table.Column(type: "NVARCHAR2(10)", maxLength: 10, nullable: true, comment: "รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"), RegistSame = table.Column(type: "NUMBER(1)", nullable: true, comment: "ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"), CurrentAddress = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ที่อยู่ปัจจุบัน"), CurrentProvinceId = table.Column(type: "RAW(16)", nullable: true), CurrentDistrictId = table.Column(type: "RAW(16)", nullable: true), CurrentSubDistrictId = table.Column(type: "RAW(16)", nullable: true), CurrentZipCode = table.Column(type: "NVARCHAR2(10)", maxLength: 10, nullable: true, comment: "รหัสไปรษณีย์ที่อยู่ปัจจุบัน"), Marry = table.Column(type: "NUMBER(1)", nullable: true, comment: "คู่สมรส"), MarryPrefixId = table.Column(type: "RAW(16)", nullable: true), MarryFirstName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "ชื่อจริงคู่สมรส"), MarryLastName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "นามสกุลคู่สมรส"), MarryOccupation = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true, comment: "อาชีพคู่สมรส"), MarryNationality = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "สัญชาติคู่สมรส"), FatherPrefixId = table.Column(type: "RAW(16)", nullable: true), FatherFirstName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "ชื่อจริงบิดา"), FatherLastName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "นามสกุลบิดา"), FatherOccupation = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true, comment: "อาชีพบิดา"), FatherNationality = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "สัญชาติบิดา"), MotherPrefixId = table.Column(type: "RAW(16)", nullable: true), MotherFirstName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "ชื่อจริงมารดา"), MotherLastName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "นามสกุลมารดา"), MotherOccupation = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true, comment: "อาชีพมารดา"), MotherNationality = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "สัญชาติมารดา"), OccupationOrg = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"), OccupationPile = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ตำแหน่งปัจจุบัน กอง"), OccupationGroup = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"), OccupationSalary = table.Column(type: "NUMBER(10)", nullable: true, comment: "ตำแหน่งปัจจุบัน เงินเดือน"), OccupationPosition = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ตำแหน่งปัจจุบัน สังกัด"), OccupationPositionType = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ตำแหน่งปัจจุบัน ประเภทราชการ"), OccupationTelephone = table.Column(type: "NVARCHAR2(20)", maxLength: 20, nullable: true, comment: "โทรศัพท์ บริษัท"), PositionNumberId = table.Column(type: "RAW(16)", nullable: true), PositionPathId = table.Column(type: "RAW(16)", nullable: true), PositionPathSideId = table.Column(type: "RAW(16)", nullable: true), PositionTypeId = table.Column(type: "RAW(16)", nullable: true), PositionLineId = table.Column(type: "RAW(16)", nullable: true), PositionLevelId = table.Column(type: "RAW(16)", nullable: true), PointTotalA = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "คะแนนเต็มภาค ก"), PointA = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "คะแนนภาค ก"), PointTotalB = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "คะแนนเต็มภาค ข"), PointB = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "คะแนนภาค ข"), PointTotalC = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "คะแนนเต็มภาค ค"), PointC = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "คะแนนภาค ค"), ExamNumber = table.Column(type: "NUMBER(10)", nullable: true, comment: "ลำดับที่สอบได้"), ExamRound = table.Column(type: "NUMBER(10)", nullable: true, comment: "จำนวนครั้งที่สมัครสอบ"), Pass = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ผลสมัครสอบ"), Draft = table.Column(type: "NUMBER(1)", nullable: true, comment: "ข้อมูลตำแหน่ง Draft"), RemarkVertical = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หมายเหตุแนวตั้ง"), RemarkHorizontal = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "หมายเหตุแนวนอน"), node = table.Column(type: "NUMBER(10)", nullable: true, comment: "ระดับโครงสร้าง"), nodeId = table.Column(type: "RAW(16)", nullable: true, comment: "id โครงสร้าง"), organizationName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน"), orgTreeShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน"), PosNumber = table.Column(type: "NUMBER(10)", nullable: true, comment: "ชื่อตำแหน่งเลขที่"), PosPath = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อตำแหน่ง"), posmasterId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id อัตรากำลัง"), root = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน root"), rootId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน root"), rootShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน root"), child1 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child1"), child1Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child1"), child1ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child1"), child2 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child2"), child2Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child2"), child2ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child2"), child3 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child3"), child3Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child3"), child3ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child3"), child4 = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อหน่วยงาน child4"), child4Id = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id หน่วยงาน child4"), child4ShortName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อย่อหน่วยงาน child4"), orgRevisionId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id revision"), positionId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ตำแหน่ง"), posMasterNo = table.Column(type: "NUMBER(10)", nullable: true, comment: "เลขที่ตำแหน่ง"), positionName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อตำแหน่งในสายงาน"), positionField = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "สายงาน"), posTypeId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ประเภทตำแหน่ง"), posTypeName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อประเภทตำแหน่ง"), posLevelId = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "id ระดับตำแหน่ง"), posLevelName = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ชื่อระดับตำแหน่ง"), typeCommand = table.Column(type: "NVARCHAR2(2000)", nullable: true, comment: "ประเภทคำสั่ง"), ProfileImgId = table.Column(type: "RAW(16)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_PlacementProfiles", x => x.Id); table.ForeignKey( name: "FK_PlacementProfiles_BloodGroups_BloodGroupId", column: x => x.BloodGroupId, principalTable: "BloodGroups", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Districts_CitizenDistrictId", column: x => x.CitizenDistrictId, principalTable: "Districts", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Districts_CurrentDistrictId", column: x => x.CurrentDistrictId, principalTable: "Districts", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Districts_RegistDistrictId", column: x => x.RegistDistrictId, principalTable: "Districts", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Documents_ProfileImgId", column: x => x.ProfileImgId, principalTable: "Documents", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Documents_ReliefDocId", column: x => x.ReliefDocId, principalTable: "Documents", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Genders_GenderId", column: x => x.GenderId, principalTable: "Genders", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_OrganizationPositions_OrganizationPositionId", column: x => x.OrganizationPositionId, principalTable: "OrganizationPositions", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Placements_PlacementId", column: x => x.PlacementId, principalTable: "Placements", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_PositionLevels_PositionLevelId", column: x => x.PositionLevelId, principalTable: "PositionLevels", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_PositionLines_PositionLineId", column: x => x.PositionLineId, principalTable: "PositionLines", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_PositionNumbers_PositionNumberId", column: x => x.PositionNumberId, principalTable: "PositionNumbers", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_PositionPathSides_PositionPathSideId", column: x => x.PositionPathSideId, principalTable: "PositionPathSides", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_PositionPaths_PositionCandidateId", column: x => x.PositionCandidateId, principalTable: "PositionPaths", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_PositionPaths_PositionPathId", column: x => x.PositionPathId, principalTable: "PositionPaths", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_PositionTypes_PositionTypeId", column: x => x.PositionTypeId, principalTable: "PositionTypes", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Prefixes_FatherPrefixId", column: x => x.FatherPrefixId, principalTable: "Prefixes", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Prefixes_MarryPrefixId", column: x => x.MarryPrefixId, principalTable: "Prefixes", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Prefixes_MotherPrefixId", column: x => x.MotherPrefixId, principalTable: "Prefixes", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Prefixes_PrefixId", column: x => x.PrefixId, principalTable: "Prefixes", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Provinces_CitizenProvinceId", column: x => x.CitizenProvinceId, principalTable: "Provinces", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Provinces_CurrentProvinceId", column: x => x.CurrentProvinceId, principalTable: "Provinces", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Provinces_RegistProvinceId", column: x => x.RegistProvinceId, principalTable: "Provinces", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Relationships_RelationshipId", column: x => x.RelationshipId, principalTable: "Relationships", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_Religions_ReligionId", column: x => x.ReligionId, principalTable: "Religions", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_SubDistricts_CurrentSubDistrictId", column: x => x.CurrentSubDistrictId, principalTable: "SubDistricts", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementProfiles_SubDistricts_RegistSubDistrictId", column: x => x.RegistSubDistrictId, principalTable: "SubDistricts", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "CommandDeployments", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), CommandId = table.Column(type: "RAW(16)", nullable: false, comment: "รหัสอ้างอิงคำสั่ง"), ReceiveUserId = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "รหัสอ้างอิงผู้ใช้งานระบบ"), Sequence = table.Column(type: "NUMBER(10)", nullable: false, comment: "ลำดับ"), CitizenId = table.Column(type: "NVARCHAR2(13)", maxLength: 13, nullable: false, comment: "เลขประจำตัวประชาชน"), Prefix = table.Column(type: "NVARCHAR2(50)", maxLength: 50, nullable: false, comment: "คำนำหน้านาม"), FirstName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "ชื่อ"), LastName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "นามสกุล"), IsSendMail = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งอีเมล์หรือไม่?"), IsSendInbox = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งกล่องข้อความหรือไม่?"), IsSendNotification = table.Column(type: "NUMBER(1)", nullable: false, comment: "ส่งแจ้งเตือนหรือไม่?"), OrganizationName = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"), PositionName = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง") }, constraints: table => { table.PrimaryKey("PK_CommandDeployments", x => x.Id); table.ForeignKey( name: "FK_CommandDeployments_Commands_CommandId", column: x => x.CommandId, principalTable: "Commands", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "CommandDocuments", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), Category = table.Column(type: "NVARCHAR2(2000)", nullable: false, comment: "ประเภทเอกสาร"), DocumentId = table.Column(type: "RAW(16)", nullable: false), CommandId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_CommandDocuments", x => x.Id); table.ForeignKey( name: "FK_CommandDocuments_Commands_CommandId", column: x => x.CommandId, principalTable: "Commands", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_CommandDocuments_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "CommandReceivers", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), CommandId = table.Column(type: "RAW(16)", nullable: false, comment: "รหัสอ้างอิงคำสั่ง"), Sequence = table.Column(type: "NUMBER(10)", nullable: false, comment: "ลำดับในบัญชีแนบท้าย"), CitizenId = table.Column(type: "NVARCHAR2(13)", maxLength: 13, nullable: false, comment: "เลขประจำตัวประชาชน"), Prefix = table.Column(type: "NVARCHAR2(50)", maxLength: 50, nullable: false, comment: "คำนำหน้านาม"), FirstName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "ชื่อ"), LastName = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: false, comment: "นามสกุล"), Comment = table.Column(type: "NCLOB", nullable: false, comment: "หมายเหตุ"), Comment2 = table.Column(type: "NCLOB", nullable: false, comment: "หมายเหตุแนวนอน"), RefPlacementProfileId = table.Column(type: "RAW(16)", nullable: true, comment: "รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"), RefDisciplineId = table.Column(type: "RAW(16)", nullable: true, comment: "รหัสอ้างอิงไปยังข้อมูลวินัย"), Amount = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "เงินเดือน"), PositionSalaryAmount = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "เงินประจำตำแหน่ง"), MouthSalaryAmount = table.Column(type: "BINARY_DOUBLE", nullable: true, comment: "เงินค่าตอบแทนรายเดือน") }, constraints: table => { table.PrimaryKey("PK_CommandReceivers", x => x.Id); table.ForeignKey( name: "FK_CommandReceivers_Commands_CommandId", column: x => x.CommandId, principalTable: "Commands", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "PlacementCertificates", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), PlacementProfileId = table.Column(type: "RAW(16)", nullable: false), CertificateNo = table.Column(type: "NVARCHAR2(20)", maxLength: 20, nullable: true, comment: "เลขที่ใบอนุญาต"), Issuer = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true, comment: "หน่วยงานผู้ออกใบอนุญาต"), IssueDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่ออกใบอนุญาต"), ExpireDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่หมดอายุ"), CertificateType = table.Column(type: "NVARCHAR2(100)", maxLength: 100, nullable: true, comment: "ชื่อใบอนุญาต") }, constraints: table => { table.PrimaryKey("PK_PlacementCertificates", x => x.Id); table.ForeignKey( name: "FK_PlacementCertificates_PlacementProfiles_PlacementProfileId", column: x => x.PlacementProfileId, principalTable: "PlacementProfiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "PlacementEducations", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), PlacementProfileId = table.Column(type: "RAW(16)", nullable: false), EducationLevelId = table.Column(type: "RAW(16)", nullable: true), Institute = table.Column(type: "NVARCHAR2(1000)", maxLength: 1000, nullable: true, comment: "สถานศึกษา"), Degree = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true, comment: "วุฒิการศึกษา"), Field = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true, comment: "สาขาวิชา/ทาง"), Gpa = table.Column(type: "NVARCHAR2(20)", maxLength: 20, nullable: true, comment: "เกรดเฉลี่ย"), Country = table.Column(type: "NVARCHAR2(1000)", maxLength: 1000, nullable: true, comment: "ประเทศ"), Duration = table.Column(type: "NVARCHAR2(1000)", maxLength: 1000, nullable: true, comment: "ระยะเวลา"), Other = table.Column(type: "NVARCHAR2(1000)", maxLength: 1000, nullable: true, comment: "ข้อมูลการติดต่อ"), FundName = table.Column(type: "NVARCHAR2(1000)", maxLength: 1000, nullable: true, comment: "ทุน"), DurationYear = table.Column(type: "NUMBER(10)", nullable: true, comment: "ระยะเวลาหลักสูตร"), FinishDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "วันที่สำเร็จการศึกษา"), IsDate = table.Column(type: "NUMBER(1)", nullable: true, comment: "ประเภทช่วงเวลาการศึกษา"), StartDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ตั้งแต่"), EndDate = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "ถึง"), PositionPathId = table.Column(type: "RAW(16)", nullable: true), IsEducation = table.Column(type: "NUMBER(1)", nullable: true, comment: "เป็นวุฒิศึกษาในตำแหน่ง") }, constraints: table => { table.PrimaryKey("PK_PlacementEducations", x => x.Id); table.ForeignKey( name: "FK_PlacementEducations_EducationLevels_EducationLevelId", column: x => x.EducationLevelId, principalTable: "EducationLevels", principalColumn: "Id"); table.ForeignKey( name: "FK_PlacementEducations_PlacementProfiles_PlacementProfileId", column: x => x.PlacementProfileId, principalTable: "PlacementProfiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_PlacementEducations_PositionPaths_PositionPathId", column: x => x.PositionPathId, principalTable: "PositionPaths", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "PlacementProfileDocs", columns: table => new { Id = table.Column(type: "RAW(16)", nullable: false, comment: "PrimaryKey"), CreatedAt = table.Column(type: "TIMESTAMP(7)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), CreatedUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล"), LastUpdatedAt = table.Column(type: "TIMESTAMP(7)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), LastUpdateUserId = table.Column(type: "NVARCHAR2(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด"), CreatedFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล"), LastUpdateFullName = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด"), DocumentId = table.Column(type: "RAW(16)", nullable: false), PlacementProfileId = table.Column(type: "RAW(16)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_PlacementProfileDocs", x => x.Id); table.ForeignKey( name: "FK_PlacementProfileDocs_Documents_DocumentId", column: x => x.DocumentId, principalTable: "Documents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_PlacementProfileDocs_PlacementProfiles_PlacementProfileId", column: x => x.PlacementProfileId, principalTable: "PlacementProfiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_CommandDeployments_CommandId", table: "CommandDeployments", column: "CommandId"); migrationBuilder.CreateIndex( name: "IX_CommandDocuments_CommandId", table: "CommandDocuments", column: "CommandId"); migrationBuilder.CreateIndex( name: "IX_CommandDocuments_DocumentId", table: "CommandDocuments", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_CommandReceivers_CommandId", table: "CommandReceivers", column: "CommandId"); migrationBuilder.CreateIndex( name: "IX_Commands_CommandStatusId", table: "Commands", column: "CommandStatusId"); migrationBuilder.CreateIndex( name: "IX_Commands_CommandTypeId", table: "Commands", column: "CommandTypeId"); migrationBuilder.CreateIndex( name: "IX_Commands_PlacementId", table: "Commands", column: "PlacementId"); migrationBuilder.CreateIndex( name: "IX_InsigniaManageOrganiations_InsigniaManageId", table: "InsigniaManageOrganiations", column: "InsigniaManageId"); migrationBuilder.CreateIndex( name: "IX_InsigniaManageOrganiations_OrganizationOrganizationId", table: "InsigniaManageOrganiations", column: "OrganizationOrganizationId"); migrationBuilder.CreateIndex( name: "IX_InsigniaManageProfiles_BorrowOrganizationId", table: "InsigniaManageProfiles", column: "BorrowOrganizationId"); migrationBuilder.CreateIndex( name: "IX_InsigniaManageProfiles_InsigniaManageOrganiationId", table: "InsigniaManageProfiles", column: "InsigniaManageOrganiationId"); migrationBuilder.CreateIndex( name: "IX_InsigniaManageProfiles_InsigniaNoteProfileId", table: "InsigniaManageProfiles", column: "InsigniaNoteProfileId"); migrationBuilder.CreateIndex( name: "IX_InsigniaManageProfiles_ReturnOrganizationId", table: "InsigniaManageProfiles", column: "ReturnOrganizationId"); migrationBuilder.CreateIndex( name: "IX_InsigniaManages_InsigniaId", table: "InsigniaManages", column: "InsigniaId"); migrationBuilder.CreateIndex( name: "IX_InsigniaNoteDocs_DocumentId", table: "InsigniaNoteDocs", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_InsigniaNoteDocs_InsigniaNoteId", table: "InsigniaNoteDocs", column: "InsigniaNoteId"); migrationBuilder.CreateIndex( name: "IX_InsigniaNoteProfiles_DocReceiveInsigniaId", table: "InsigniaNoteProfiles", column: "DocReceiveInsigniaId"); migrationBuilder.CreateIndex( name: "IX_InsigniaNoteProfiles_DocReturnInsigniaId", table: "InsigniaNoteProfiles", column: "DocReturnInsigniaId"); migrationBuilder.CreateIndex( name: "IX_InsigniaNoteProfiles_InsigniaNoteId", table: "InsigniaNoteProfiles", column: "InsigniaNoteId"); migrationBuilder.CreateIndex( name: "IX_InsigniaNoteProfiles_OrgReceiveInsigniaId", table: "InsigniaNoteProfiles", column: "OrgReceiveInsigniaId"); migrationBuilder.CreateIndex( name: "IX_InsigniaNoteProfiles_OrgReturnInsigniaId", table: "InsigniaNoteProfiles", column: "OrgReturnInsigniaId"); migrationBuilder.CreateIndex( name: "IX_InsigniaNoteProfiles_ProfileId", table: "InsigniaNoteProfiles", column: "ProfileId"); migrationBuilder.CreateIndex( name: "IX_InsigniaNoteProfiles_RequestInsigniaId", table: "InsigniaNoteProfiles", column: "RequestInsigniaId"); migrationBuilder.CreateIndex( name: "IX_InsigniaPeriods_ReliefDocId", table: "InsigniaPeriods", column: "ReliefDocId"); migrationBuilder.CreateIndex( name: "IX_InsigniaRequestProfiles_ProfileId", table: "InsigniaRequestProfiles", column: "ProfileId"); migrationBuilder.CreateIndex( name: "IX_InsigniaRequestProfiles_RequestId", table: "InsigniaRequestProfiles", column: "RequestId"); migrationBuilder.CreateIndex( name: "IX_InsigniaRequestProfiles_RequestInsigniaId", table: "InsigniaRequestProfiles", column: "RequestInsigniaId"); migrationBuilder.CreateIndex( name: "IX_InsigniaRequests_DocumentId", table: "InsigniaRequests", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_InsigniaRequests_OrganizationId", table: "InsigniaRequests", column: "OrganizationId"); migrationBuilder.CreateIndex( name: "IX_InsigniaRequests_PeriodId", table: "InsigniaRequests", column: "PeriodId"); migrationBuilder.CreateIndex( name: "IX_PlacementAppointmentDocs_DocumentId", table: "PlacementAppointmentDocs", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_PlacementAppointmentDocs_PlacementAppointmentId", table: "PlacementAppointmentDocs", column: "PlacementAppointmentId"); migrationBuilder.CreateIndex( name: "IX_PlacementAppointments_CommandTypeId", table: "PlacementAppointments", column: "CommandTypeId"); migrationBuilder.CreateIndex( name: "IX_PlacementCertificates_PlacementProfileId", table: "PlacementCertificates", column: "PlacementProfileId"); migrationBuilder.CreateIndex( name: "IX_PlacementEducations_EducationLevelId", table: "PlacementEducations", column: "EducationLevelId"); migrationBuilder.CreateIndex( name: "IX_PlacementEducations_PlacementProfileId", table: "PlacementEducations", column: "PlacementProfileId"); migrationBuilder.CreateIndex( name: "IX_PlacementEducations_PositionPathId", table: "PlacementEducations", column: "PositionPathId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfileDocs_DocumentId", table: "PlacementProfileDocs", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfileDocs_PlacementProfileId", table: "PlacementProfileDocs", column: "PlacementProfileId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_BloodGroupId", table: "PlacementProfiles", column: "BloodGroupId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_CitizenDistrictId", table: "PlacementProfiles", column: "CitizenDistrictId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_CitizenProvinceId", table: "PlacementProfiles", column: "CitizenProvinceId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_CurrentDistrictId", table: "PlacementProfiles", column: "CurrentDistrictId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_CurrentProvinceId", table: "PlacementProfiles", column: "CurrentProvinceId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_CurrentSubDistrictId", table: "PlacementProfiles", column: "CurrentSubDistrictId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_FatherPrefixId", table: "PlacementProfiles", column: "FatherPrefixId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_GenderId", table: "PlacementProfiles", column: "GenderId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_MarryPrefixId", table: "PlacementProfiles", column: "MarryPrefixId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_MotherPrefixId", table: "PlacementProfiles", column: "MotherPrefixId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_OrganizationPositionId", table: "PlacementProfiles", column: "OrganizationPositionId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_PlacementId", table: "PlacementProfiles", column: "PlacementId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_PositionCandidateId", table: "PlacementProfiles", column: "PositionCandidateId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_PositionLevelId", table: "PlacementProfiles", column: "PositionLevelId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_PositionLineId", table: "PlacementProfiles", column: "PositionLineId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_PositionNumberId", table: "PlacementProfiles", column: "PositionNumberId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_PositionPathId", table: "PlacementProfiles", column: "PositionPathId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_PositionPathSideId", table: "PlacementProfiles", column: "PositionPathSideId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_PositionTypeId", table: "PlacementProfiles", column: "PositionTypeId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_PrefixId", table: "PlacementProfiles", column: "PrefixId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_ProfileImgId", table: "PlacementProfiles", column: "ProfileImgId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_RegistDistrictId", table: "PlacementProfiles", column: "RegistDistrictId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_RegistProvinceId", table: "PlacementProfiles", column: "RegistProvinceId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_RegistSubDistrictId", table: "PlacementProfiles", column: "RegistSubDistrictId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_RelationshipId", table: "PlacementProfiles", column: "RelationshipId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_ReliefDocId", table: "PlacementProfiles", column: "ReliefDocId"); migrationBuilder.CreateIndex( name: "IX_PlacementProfiles_ReligionId", table: "PlacementProfiles", column: "ReligionId"); migrationBuilder.CreateIndex( name: "IX_PlacementReceiveDocs_DocumentId", table: "PlacementReceiveDocs", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_PlacementReceiveDocs_PlacementReceiveId", table: "PlacementReceiveDocs", column: "PlacementReceiveId"); migrationBuilder.CreateIndex( name: "IX_PlacementReceives_AvatarId", table: "PlacementReceives", column: "AvatarId"); migrationBuilder.CreateIndex( name: "IX_PlacementReceives_BloodGroupId", table: "PlacementReceives", column: "BloodGroupId"); migrationBuilder.CreateIndex( name: "IX_PlacementReceives_GenderId", table: "PlacementReceives", column: "GenderId"); migrationBuilder.CreateIndex( name: "IX_PlacementReceives_RelationshipId", table: "PlacementReceives", column: "RelationshipId"); migrationBuilder.CreateIndex( name: "IX_PlacementReceives_ReligionId", table: "PlacementReceives", column: "ReligionId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocationDocs_DocumentId", table: "PlacementRelocationDocs", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocationDocs_PlacementRelocationId", table: "PlacementRelocationDocs", column: "PlacementRelocationId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_BloodGroupId", table: "PlacementRelocations", column: "BloodGroupId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_GenderId", table: "PlacementRelocations", column: "GenderId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_OrganizationPositionId", table: "PlacementRelocations", column: "OrganizationPositionId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_PositionLevelId", table: "PlacementRelocations", column: "PositionLevelId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_PositionLineId", table: "PlacementRelocations", column: "PositionLineId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_PositionNumberId", table: "PlacementRelocations", column: "PositionNumberId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_PositionPathId", table: "PlacementRelocations", column: "PositionPathId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_PositionPathSideId", table: "PlacementRelocations", column: "PositionPathSideId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_PositionTypeId", table: "PlacementRelocations", column: "PositionTypeId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_PrefixId", table: "PlacementRelocations", column: "PrefixId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_ProfileId", table: "PlacementRelocations", column: "ProfileId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_RelationshipId", table: "PlacementRelocations", column: "RelationshipId"); migrationBuilder.CreateIndex( name: "IX_PlacementRelocations_ReligionId", table: "PlacementRelocations", column: "ReligionId"); migrationBuilder.CreateIndex( name: "IX_Placements_PlacementTypeId", table: "Placements", column: "PlacementTypeId"); migrationBuilder.CreateIndex( name: "IX_PlacementTransferDocs_DocumentId", table: "PlacementTransferDocs", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_PlacementTransferDocs_PlacementTransferId", table: "PlacementTransferDocs", column: "PlacementTransferId"); migrationBuilder.CreateIndex( name: "IX_PlacementTransfers_ProfileId", table: "PlacementTransfers", column: "ProfileId"); migrationBuilder.CreateIndex( name: "IX_RetirementDeceasedNotis_DocumentId", table: "RetirementDeceasedNotis", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_RetirementDeceasedNotis_ReceiveUserId", table: "RetirementDeceasedNotis", column: "ReceiveUserId"); migrationBuilder.CreateIndex( name: "IX_RetirementDeceasedNotis_RetirementDeceasedId", table: "RetirementDeceasedNotis", column: "RetirementDeceasedId"); migrationBuilder.CreateIndex( name: "IX_RetirementDeceaseds_DocumentForwardId", table: "RetirementDeceaseds", column: "DocumentForwardId"); migrationBuilder.CreateIndex( name: "IX_RetirementDeceaseds_DocumentId", table: "RetirementDeceaseds", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_RetirementDischarges_ProfileId", table: "RetirementDischarges", column: "ProfileId"); migrationBuilder.CreateIndex( name: "IX_RetirementExpulsions_ProfileId", table: "RetirementExpulsions", column: "ProfileId"); migrationBuilder.CreateIndex( name: "IX_RetirementOtherDocs_DocumentId", table: "RetirementOtherDocs", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_RetirementOtherDocs_RetirementOtherId", table: "RetirementOtherDocs", column: "RetirementOtherId"); migrationBuilder.CreateIndex( name: "IX_RetirementOthers_CommandTypeId", table: "RetirementOthers", column: "CommandTypeId"); migrationBuilder.CreateIndex( name: "IX_RetirementPeriodHistorys_DocumentId", table: "RetirementPeriodHistorys", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_RetirementPeriodHistorys_RetirementPeriodId", table: "RetirementPeriodHistorys", column: "RetirementPeriodId"); migrationBuilder.CreateIndex( name: "IX_RetirementPeriods_DocumentId", table: "RetirementPeriods", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_RetirementProfiles_ProfileId", table: "RetirementProfiles", column: "ProfileId"); migrationBuilder.CreateIndex( name: "IX_RetirementProfiles_RetirementPeriodId", table: "RetirementProfiles", column: "RetirementPeriodId"); migrationBuilder.CreateIndex( name: "IX_RetirementQuestions_RetirementResignId", table: "RetirementQuestions", column: "RetirementResignId"); migrationBuilder.CreateIndex( name: "IX_RetirementResignDocs_DocumentId", table: "RetirementResignDocs", column: "DocumentId"); migrationBuilder.CreateIndex( name: "IX_RetirementResignDocs_RetirementResignId", table: "RetirementResignDocs", column: "RetirementResignId"); migrationBuilder.CreateIndex( name: "IX_RetirementResigns_ProfileId", table: "RetirementResigns", column: "ProfileId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "CommandDeployments"); migrationBuilder.DropTable( name: "CommandDocuments"); migrationBuilder.DropTable( name: "CommandReceivers"); migrationBuilder.DropTable( name: "CronjobNotiProbations"); migrationBuilder.DropTable( name: "DeploymentChannels"); migrationBuilder.DropTable( name: "Inboxes"); migrationBuilder.DropTable( name: "InsigniaManageProfiles"); migrationBuilder.DropTable( name: "InsigniaNoteDocs"); migrationBuilder.DropTable( name: "InsigniaRequestProfiles"); migrationBuilder.DropTable( name: "MessageQueues"); migrationBuilder.DropTable( name: "Notifications"); migrationBuilder.DropTable( name: "PlacementAppointmentDocs"); migrationBuilder.DropTable( name: "PlacementCertificates"); migrationBuilder.DropTable( name: "PlacementEducations"); migrationBuilder.DropTable( name: "PlacementIsProperties"); migrationBuilder.DropTable( name: "PlacementOfficers"); migrationBuilder.DropTable( name: "PlacementProfileDocs"); migrationBuilder.DropTable( name: "PlacementReceiveDocs"); migrationBuilder.DropTable( name: "PlacementRelocationDocs"); migrationBuilder.DropTable( name: "PlacementRepatriations"); migrationBuilder.DropTable( name: "PlacementTransferDocs"); migrationBuilder.DropTable( name: "RetirementDeceasedNotis"); migrationBuilder.DropTable( name: "RetirementDischarges"); migrationBuilder.DropTable( name: "RetirementExpulsions"); migrationBuilder.DropTable( name: "RetirementOtherDocs"); migrationBuilder.DropTable( name: "RetirementOuts"); migrationBuilder.DropTable( name: "RetirementPeriodHistorys"); migrationBuilder.DropTable( name: "RetirementProfiles"); migrationBuilder.DropTable( name: "RetirementQuestionnaireQuestions"); migrationBuilder.DropTable( name: "RetirementQuestions"); migrationBuilder.DropTable( name: "RetirementResignDocs"); migrationBuilder.DropTable( name: "Commands"); migrationBuilder.DropTable( name: "InsigniaManageOrganiations"); migrationBuilder.DropTable( name: "InsigniaNoteProfiles"); migrationBuilder.DropTable( name: "InsigniaRequests"); migrationBuilder.DropTable( name: "PlacementAppointments"); migrationBuilder.DropTable( name: "PlacementProfiles"); migrationBuilder.DropTable( name: "PlacementReceives"); migrationBuilder.DropTable( name: "PlacementRelocations"); migrationBuilder.DropTable( name: "PlacementTransfers"); migrationBuilder.DropTable( name: "RetirementDeceaseds"); migrationBuilder.DropTable( name: "RetirementOthers"); migrationBuilder.DropTable( name: "RetirementPeriods"); migrationBuilder.DropTable( name: "RetirementResigns"); migrationBuilder.DropTable( name: "CommandStatuses"); migrationBuilder.DropTable( name: "InsigniaManages"); migrationBuilder.DropTable( name: "InsigniaNotes"); migrationBuilder.DropTable( name: "InsigniaPeriods"); migrationBuilder.DropTable( name: "Placements"); migrationBuilder.DropTable( name: "CommandTypes"); migrationBuilder.DropTable( name: "PlacementTypes"); } } }