hrms-api-backend/BMA.EHR.Infrastructure/Migrations/20250205065119_update table placementProfile add dnaroot.cs
2025-02-05 17:48:58 +07:00

498 lines
18 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetableplacementProfileadddnaroot : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "RetirementOthers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "RetirementOthers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "RetirementOthers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "RetirementOthers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "RetirementOthers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "PlacementTransfers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "PlacementTransfers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "PlacementTransfers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "PlacementTransfers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "PlacementTransfers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "PlacementRepatriations",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "PlacementRepatriations",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "PlacementRepatriations",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "PlacementRepatriations",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "PlacementRepatriations",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "PlacementReceives",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "PlacementReceives",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "PlacementReceives",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "PlacementReceives",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "PlacementReceives",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "PlacementOfficers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "PlacementOfficers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "PlacementOfficers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "PlacementOfficers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "PlacementOfficers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "PlacementAppointments",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "PlacementAppointments",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "PlacementAppointments",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "PlacementAppointments",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "PlacementAppointments",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "PlacementAppointmentEmployee",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "PlacementAppointmentEmployee",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "PlacementAppointmentEmployee",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "PlacementAppointmentEmployee",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "PlacementAppointmentEmployee",
type: "longtext",
nullable: true,
comment: "id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "RetirementOthers");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "RetirementOthers");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "RetirementOthers");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "RetirementOthers");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "RetirementOthers");
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "PlacementTransfers");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "PlacementTransfers");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "PlacementTransfers");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "PlacementTransfers");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "PlacementTransfers");
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "PlacementRepatriations");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "PlacementRepatriations");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "PlacementRepatriations");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "PlacementRepatriations");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "PlacementRepatriations");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "PlacementReceives");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "PlacementReceives");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "PlacementReceives");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "PlacementReceives");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "PlacementReceives");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "PlacementOfficers");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "PlacementOfficers");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "PlacementOfficers");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "PlacementOfficers");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "PlacementOfficers");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "PlacementAppointments");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "PlacementAppointments");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "PlacementAppointments");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "PlacementAppointments");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "PlacementAppointments");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "PlacementAppointmentEmployee");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "PlacementAppointmentEmployee");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "PlacementAppointmentEmployee");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "PlacementAppointmentEmployee");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "PlacementAppointmentEmployee");
}
}
}