using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
///
public partial class deletetavlemetadata : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AvailablePositionLevels");
migrationBuilder.DropTable(
name: "BloodGroups");
migrationBuilder.DropTable(
name: "EducationLevels");
migrationBuilder.DropTable(
name: "Holidays");
migrationBuilder.DropTable(
name: "LimitTypeLeave");
migrationBuilder.DropTable(
name: "OrganizationAgencys");
migrationBuilder.DropTable(
name: "OrganizationGovernmentAgencys");
migrationBuilder.DropTable(
name: "PhysicalStatuses");
migrationBuilder.DropTable(
name: "PositionEmployeeStatuses");
migrationBuilder.DropTable(
name: "PositionMasterHistoryEntity");
migrationBuilder.DropTable(
name: "Positions");
migrationBuilder.DropTable(
name: "ProfileAbilityHistory");
migrationBuilder.DropTable(
name: "ProfileAddressHistory");
migrationBuilder.DropTable(
name: "ProfileAssessmentHistory");
migrationBuilder.DropTable(
name: "ProfileAvatarHistory");
migrationBuilder.DropTable(
name: "ProfileCertificateHistory");
migrationBuilder.DropTable(
name: "ProfileChangeNameHistory");
migrationBuilder.DropTable(
name: "ProfileChildrenHistory");
migrationBuilder.DropTable(
name: "ProfileCoupleHistory");
migrationBuilder.DropTable(
name: "ProfileCurrentAddressHistory");
migrationBuilder.DropTable(
name: "ProfileDisciplineHistory");
migrationBuilder.DropTable(
name: "ProfileDutyHistory");
migrationBuilder.DropTable(
name: "ProfileEducationHistory");
migrationBuilder.DropTable(
name: "ProfileEmployment");
migrationBuilder.DropTable(
name: "ProfileFatherHistory");
migrationBuilder.DropTable(
name: "ProfileGovernmentHistory");
migrationBuilder.DropTable(
name: "ProfileHistory");
migrationBuilder.DropTable(
name: "ProfileHonorHistory");
migrationBuilder.DropTable(
name: "ProfileInsigniaHistory");
migrationBuilder.DropTable(
name: "ProfileLeaveHistory");
migrationBuilder.DropTable(
name: "ProfileMotherHistory");
migrationBuilder.DropTable(
name: "ProfileNopaidHistory");
migrationBuilder.DropTable(
name: "ProfileOtherHistory");
migrationBuilder.DropTable(
name: "ProfilePaper");
migrationBuilder.DropTable(
name: "ProfilePositions");
migrationBuilder.DropTable(
name: "ProfileRegistrationAddressHistory");
migrationBuilder.DropTable(
name: "ProfileSalaryHistory");
migrationBuilder.DropTable(
name: "ProfileTrainingHistory");
migrationBuilder.DropTable(
name: "Relationships");
migrationBuilder.DropTable(
name: "Religions");
migrationBuilder.DropTable(
name: "RoyalHierarchys");
migrationBuilder.DropTable(
name: "Royals");
migrationBuilder.DropTable(
name: "RoyalTypes");
migrationBuilder.DropTable(
name: "SubDistricts");
migrationBuilder.DropTable(
name: "ProfileAbility");
migrationBuilder.DropTable(
name: "ProfileAssessment");
migrationBuilder.DropTable(
name: "ProfileCertificate");
migrationBuilder.DropTable(
name: "ProfileChangeName");
migrationBuilder.DropTable(
name: "ProfileChildren");
migrationBuilder.DropTable(
name: "ProfileFamilyHistory");
migrationBuilder.DropTable(
name: "ProfileDiscipline");
migrationBuilder.DropTable(
name: "ProfileDuty");
migrationBuilder.DropTable(
name: "ProfileEducation");
migrationBuilder.DropTable(
name: "ProfileHonor");
migrationBuilder.DropTable(
name: "ProfileInsignia");
migrationBuilder.DropTable(
name: "ProfileLeave");
migrationBuilder.DropTable(
name: "ProfileNopaid");
migrationBuilder.DropTable(
name: "ProfileOther");
migrationBuilder.DropTable(
name: "OrganizationPositions");
migrationBuilder.DropTable(
name: "ProfileSalary");
migrationBuilder.DropTable(
name: "ProfileTraining");
migrationBuilder.DropTable(
name: "Districts");
migrationBuilder.DropTable(
name: "Insignias");
migrationBuilder.DropTable(
name: "TypeLeave");
migrationBuilder.DropTable(
name: "Organizations");
migrationBuilder.DropTable(
name: "PositionMasters");
migrationBuilder.DropTable(
name: "Profile");
migrationBuilder.DropTable(
name: "Provinces");
migrationBuilder.DropTable(
name: "InsigniaTypes");
migrationBuilder.DropTable(
name: "OrganizationFaxs");
migrationBuilder.DropTable(
name: "OrganizationLevels");
migrationBuilder.DropTable(
name: "OrganizationOrganizations");
migrationBuilder.DropTable(
name: "OrganizationStatuses");
migrationBuilder.DropTable(
name: "OrganizationTelExternals");
migrationBuilder.DropTable(
name: "OrganizationTelInternals");
migrationBuilder.DropTable(
name: "OrganizationTypes");
migrationBuilder.DropTable(
name: "PositionExecutiveSides");
migrationBuilder.DropTable(
name: "PositionExecutives");
migrationBuilder.DropTable(
name: "PositionLines");
migrationBuilder.DropTable(
name: "PositionPathSides");
migrationBuilder.DropTable(
name: "PositionStatuss");
migrationBuilder.DropTable(
name: "Document");
migrationBuilder.DropTable(
name: "Genders");
migrationBuilder.DropTable(
name: "LimitLeave");
migrationBuilder.DropTable(
name: "PositionEmployeeGroups");
migrationBuilder.DropTable(
name: "PositionEmployeeLevels");
migrationBuilder.DropTable(
name: "PositionEmployeeLines");
migrationBuilder.DropTable(
name: "PositionEmployeePositionSides");
migrationBuilder.DropTable(
name: "PositionEmployeePositions");
migrationBuilder.DropTable(
name: "PositionLevels");
migrationBuilder.DropTable(
name: "PositionNumbers");
migrationBuilder.DropTable(
name: "PositionPaths");
migrationBuilder.DropTable(
name: "PositionTypes");
migrationBuilder.DropTable(
name: "Prefixes");
migrationBuilder.DropTable(
name: "OrganizationShortNames");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "BloodGroups",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(2)", maxLength: 2, nullable: false, comment: "ชื่อหมู่โลหิต")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_BloodGroups", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Document",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
CreatedDate = table.Column(type: "datetime(6)", nullable: false),
Detail = table.Column(type: "text", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FileName = table.Column(type: "varchar(255)", maxLength: 255, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FileSize = table.Column(type: "int", nullable: false),
FileType = table.Column(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ObjectRefId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_Document", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "EducationLevels",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ระดับการศึกษา")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_EducationLevels", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Genders",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(20)", maxLength: 20, nullable: false, comment: "เพศ")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_Genders", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Holidays",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Year = table.Column(type: "int", nullable: false, comment: "ประจำปี"),
HolidayDate = table.Column(type: "datetime(6)", nullable: false, comment: "วันหยุด"),
OriginalDate = table.Column(type: "datetime(6)", nullable: false, comment: "วันหยุด(Original)"),
Name = table.Column(type: "varchar(250)", maxLength: 250, nullable: false, comment: "ชื่อวันหยุด")
.Annotation("MySql:CharSet", "utf8mb4"),
IsSpecial = table.Column(type: "tinyint(1)", nullable: false, comment: "เป็นวันหยุดพิเศษหรือไม่"),
Category = table.Column(type: "longtext", nullable: false, comment: "ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_Holidays", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "InsigniaTypes",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "ชื่อประเภทเครื่องราช")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_InsigniaTypes", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "LimitLeave",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
Name = table.Column(type: "longtext", nullable: true, comment: "ยังไม่ชัวใช้อะไรเป็นkey")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_LimitLeave", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OrganizationAgencys",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationAgencys", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OrganizationFaxs",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationFaxs", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OrganizationGovernmentAgencys",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationGovernmentAgencys", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OrganizationLevels",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationLevels", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OrganizationOrganizations",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
Note = table.Column(type: "longtext", nullable: false, comment: "หมายเหตุ")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationOrganizations", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OrganizationShortNames",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
AgencyCode = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน")
.Annotation("MySql:CharSet", "utf8mb4"),
GovernmentCode = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ")
.Annotation("MySql:CharSet", "utf8mb4"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
Note = table.Column(type: "longtext", nullable: false, comment: "หมายเหตุ")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationShortNames", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OrganizationStatuses",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationStatuses", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OrganizationTelExternals",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationTelExternals", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OrganizationTelInternals",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationTelInternals", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OrganizationTypes",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_OrganizationTypes", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PhysicalStatuses",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "สถานภาพทางกาย")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_PhysicalStatuses", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PositionEmployeeGroups",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_PositionEmployeeGroups", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PositionEmployeeLevels",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Order = table.Column(type: "int", nullable: true, comment: "ลำดับ"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_PositionEmployeeLevels", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PositionEmployeeLines",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_PositionEmployeeLines", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PositionEmployeePositions",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
Note = table.Column(type: "longtext", nullable: false, comment: "หมายเหตุ")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_PositionEmployeePositions", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PositionEmployeePositionSides",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
Note = table.Column(type: "longtext", nullable: false, comment: "หมายเหตุ")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_PositionEmployeePositionSides", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PositionEmployeeStatuses",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_PositionEmployeeStatuses", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PositionExecutives",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_PositionExecutives", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PositionExecutiveSides",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อด้านทางการบริหาร")
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
Note = table.Column(type: "longtext", nullable: false, comment: "หมายเหตุ")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_PositionExecutiveSides", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PositionLevels",
columns: table => new
{
Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"),
Order = table.Column(type: "int", nullable: true, comment: "ลำดับ"),
Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อระดับตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4"),
ShortName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "ชื่อย่อระดับตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4"),
Level = table.Column(type: "int", nullable: false, comment: "ลำดับชั้นของระดับตำแหน่ง"),
IsActive = table.Column(type: "tinyint(1)", nullable: false, comment: "สถานะการใช้งาน"),
CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"),
CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"),
LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด")
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล")
.Annotation("MySql:CharSet", "utf8mb4"),
LastUpdateFullName = table.Column