424 lines
15 KiB
C#
424 lines
15 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BMA.EHR.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class update_table_retirementOther_add_position : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "PositionExecutive",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ตำแหน่งทางการบริหาร")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "ReportingDate",
|
|
table: "RetirementOthers",
|
|
type: "datetime(6)",
|
|
nullable: true,
|
|
comment: "วันที่รายงานตัว");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child1",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อหน่วยงาน child1")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child1DnaId",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id หน่วยงาน child1Dna")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child1Id",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id หน่วยงาน child1")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child1ShortName",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อย่อหน่วยงาน child1")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child2",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อหน่วยงาน child2")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child2DnaId",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id หน่วยงาน child2Dna")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child2Id",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id หน่วยงาน child2")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child2ShortName",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อย่อหน่วยงาน child2")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child3",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อหน่วยงาน child3")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child3DnaId",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id หน่วยงาน child3Dna")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child3Id",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id หน่วยงาน child3")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child3ShortName",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อย่อหน่วยงาน child3")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child4",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อหน่วยงาน child4")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child4DnaId",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id หน่วยงาน child4Dna")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child4Id",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id หน่วยงาน child4")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "child4ShortName",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อย่อหน่วยงาน child4")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "node",
|
|
table: "RetirementOthers",
|
|
type: "int",
|
|
nullable: true,
|
|
comment: "ระดับโครงสร้าง");
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "nodeId",
|
|
table: "RetirementOthers",
|
|
type: "char(36)",
|
|
nullable: true,
|
|
comment: "id โครงสร้าง",
|
|
collation: "ascii_general_ci");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "orgRevisionId",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id revision")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "posLevelId",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id ระดับตำแหน่ง")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "posLevelName",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อระดับตำแหน่ง")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "posMasterNo",
|
|
table: "RetirementOthers",
|
|
type: "int",
|
|
nullable: true,
|
|
comment: "เลขที่ตำแหน่ง");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "posTypeId",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id ประเภทตำแหน่ง")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "posTypeName",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อประเภทตำแหน่ง")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "position",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อตำแหน่งในสายงาน")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "positionField",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "สายงาน")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "positionId",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id ตำแหน่ง")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "posmasterId",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id อัตรากำลัง")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "root",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อหน่วยงาน root")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "rootDnaId",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id หน่วยงาน rootDna")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "rootId",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "id หน่วยงาน root")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "rootShortName",
|
|
table: "RetirementOthers",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ชื่อย่อหน่วยงาน root")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "PositionExecutive",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ReportingDate",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child1",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child1DnaId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child1Id",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child1ShortName",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child2",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child2DnaId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child2Id",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child2ShortName",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child3",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child3DnaId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child3Id",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child3ShortName",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child4",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child4DnaId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child4Id",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "child4ShortName",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "node",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "nodeId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "orgRevisionId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "posLevelId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "posLevelName",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "posMasterNo",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "posTypeId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "posTypeName",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "position",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "positionField",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "positionId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "posmasterId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "root",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "rootDnaId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "rootId",
|
|
table: "RetirementOthers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "rootShortName",
|
|
table: "RetirementOthers");
|
|
}
|
|
}
|
|
}
|