แก้ระบบบรรจุผูกโครงสร้างใหม่
This commit is contained in:
parent
57164f5d45
commit
18d75f4b04
37 changed files with 79295 additions and 3904 deletions
17351
BMA.EHR.Infrastructure/Migrations/20240501075245_update table PlacementOfficer add child1.Designer.cs
generated
Normal file
17351
BMA.EHR.Infrastructure/Migrations/20240501075245_update table PlacementOfficer add child1.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,373 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetablePlacementOfficeraddchild1 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// migrationBuilder.DropForeignKey(
|
||||
// name: "FK_PlacementOfficers_Profiles_ProfileId",
|
||||
// table: "PlacementOfficers");
|
||||
|
||||
// migrationBuilder.DropIndex(
|
||||
// name: "IX_PlacementOfficers_ProfileId",
|
||||
// table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ProfileId",
|
||||
table: "PlacementOfficers",
|
||||
newName: "profileId");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "profileId",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "profile Id",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1Id",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1ShortName",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2Id",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2ShortName",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3Id",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3ShortName",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4Id",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4ShortName",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "citizenId",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "เลขบัตรประชาชน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "firstName",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "lastName",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "นามสกุล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posLevelId",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id ระดับตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posLevelName",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อระดับตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "posMasterNo",
|
||||
table: "PlacementOfficers",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "เลขที่ตำแหน่ง");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posTypeId",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id ประเภทตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posTypeName",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อประเภทตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "position",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อตำแหน่งในสายงาน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "prefix",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "คำนำหน้า")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "root",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "rootId",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "rootShortName",
|
||||
table: "PlacementOfficers",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1Id",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1ShortName",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2Id",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2ShortName",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3Id",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3ShortName",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4Id",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4ShortName",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "citizenId",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "firstName",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "lastName",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posLevelId",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posLevelName",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posMasterNo",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posTypeId",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posTypeName",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "position",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "prefix",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "root",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "rootId",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "rootShortName",
|
||||
table: "PlacementOfficers");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "profileId",
|
||||
table: "PlacementOfficers",
|
||||
newName: "ProfileId");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "ProfileId",
|
||||
table: "PlacementOfficers",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "profile Id")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
// migrationBuilder.CreateIndex(
|
||||
// name: "IX_PlacementOfficers_ProfileId",
|
||||
// table: "PlacementOfficers",
|
||||
// column: "ProfileId");
|
||||
|
||||
// migrationBuilder.AddForeignKey(
|
||||
// name: "FK_PlacementOfficers_Profiles_ProfileId",
|
||||
// table: "PlacementOfficers",
|
||||
// column: "ProfileId",
|
||||
// principalTable: "Profiles",
|
||||
// principalColumn: "Id",
|
||||
// onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
17439
BMA.EHR.Infrastructure/Migrations/20240501085812_update table PlacementRepatriation add child1.Designer.cs
generated
Normal file
17439
BMA.EHR.Infrastructure/Migrations/20240501085812_update table PlacementRepatriation add child1.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,373 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetablePlacementRepatriationaddchild1 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementRepatriations_Profiles_ProfileId",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementRepatriations_ProfileId",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ProfileId",
|
||||
table: "PlacementRepatriations",
|
||||
newName: "profileId");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "profileId",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "profile Id",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1Id",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1ShortName",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2Id",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2ShortName",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3Id",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3ShortName",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4Id",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4ShortName",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "citizenId",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "เลขบัตรประชาชน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "firstName",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "lastName",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "นามสกุล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posLevelId",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id ระดับตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posLevelName",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อระดับตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "posMasterNo",
|
||||
table: "PlacementRepatriations",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "เลขที่ตำแหน่ง");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posTypeId",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id ประเภทตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posTypeName",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อประเภทตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "position",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อตำแหน่งในสายงาน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "prefix",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "คำนำหน้า")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "root",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "rootId",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "rootShortName",
|
||||
table: "PlacementRepatriations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1Id",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1ShortName",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2Id",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2ShortName",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3Id",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3ShortName",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4Id",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4ShortName",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "citizenId",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "firstName",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "lastName",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posLevelId",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posLevelName",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posMasterNo",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posTypeId",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posTypeName",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "position",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "prefix",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "root",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "rootId",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "rootShortName",
|
||||
table: "PlacementRepatriations");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "profileId",
|
||||
table: "PlacementRepatriations",
|
||||
newName: "ProfileId");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "ProfileId",
|
||||
table: "PlacementRepatriations",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "profile Id")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementRepatriations_ProfileId",
|
||||
table: "PlacementRepatriations",
|
||||
column: "ProfileId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementRepatriations_Profiles_ProfileId",
|
||||
table: "PlacementRepatriations",
|
||||
column: "ProfileId",
|
||||
principalTable: "Profiles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
17528
BMA.EHR.Infrastructure/Migrations/20240501145515_update table PlacementOut add child1.Designer.cs
generated
Normal file
17528
BMA.EHR.Infrastructure/Migrations/20240501145515_update table PlacementOut add child1.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
17550
BMA.EHR.Infrastructure/Migrations/20240501164708_update table PlacementRecive add child1.Designer.cs
generated
Normal file
17550
BMA.EHR.Infrastructure/Migrations/20240501164708_update table PlacementRecive add child1.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,743 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetablePlacementReciveaddchild1 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementReceives_OrganizationPositions_OrganizationPosition~",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementReceives_PositionLevels_PositionLevelId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementReceives_PositionLines_PositionLineId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementReceives_PositionNumbers_PositionNumberId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementReceives_PositionPathSides_PositionPathSideId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementReceives_PositionPaths_PositionPathId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementReceives_PositionTypes_PositionTypeId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementReceives_Prefixes_PrefixId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementReceives_OrganizationPositionId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementReceives_PositionLevelId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementReceives_PositionLineId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementReceives_PositionNumberId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementReceives_PositionPathId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementReceives_PositionPathSideId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementReceives_PositionTypeId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementReceives_PrefixId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OrganizationPositionId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionLevelId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionLineId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionNumberId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionPathId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionPathSideId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionTypeId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PrefixId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Lastname",
|
||||
table: "PlacementReceives",
|
||||
newName: "lastName");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Firstname",
|
||||
table: "PlacementReceives",
|
||||
newName: "firstName");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CitizenId",
|
||||
table: "PlacementReceives",
|
||||
newName: "citizenId");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "lastName",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "นามสกุล",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldComment: "นามสกุล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "firstName",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อ",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldComment: "ชื่อ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "citizenId",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "เลขบัตรประชาชน",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(20)",
|
||||
oldMaxLength: 20,
|
||||
oldComment: "เลขประจำตัวประชาชน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1Id",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child1ShortName",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child1")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2Id",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child2ShortName",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child2")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3Id",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child3ShortName",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child3")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4Id",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "child4ShortName",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child4")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "node",
|
||||
table: "PlacementReceives",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "ระดับโครงสร้าง");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "nodeId",
|
||||
table: "PlacementReceives",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
comment: "id โครงสร้าง",
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "orgRevisionId",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id revision")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posLevelId",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id ระดับตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posLevelName",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อระดับตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "posMasterNo",
|
||||
table: "PlacementReceives",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "เลขที่ตำแหน่ง");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posTypeId",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id ประเภทตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posTypeName",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อประเภทตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "positionField",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "สายงาน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "positionId",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id ตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "positionName",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อตำแหน่งในสายงาน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "posmasterId",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id อัตรากำลัง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "prefix",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "คำนำหน้า")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "profileId",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "profile Id")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "root",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "rootId",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "rootShortName",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน root")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1Id",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child1ShortName",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2Id",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child2ShortName",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3Id",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child3ShortName",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4Id",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "child4ShortName",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "node",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "nodeId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "orgRevisionId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posLevelId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posLevelName",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posMasterNo",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posTypeId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posTypeName",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "positionField",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "positionId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "positionName",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "posmasterId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "prefix",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "profileId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "root",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "rootId",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "rootShortName",
|
||||
table: "PlacementReceives");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "lastName",
|
||||
table: "PlacementReceives",
|
||||
newName: "Lastname");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "firstName",
|
||||
table: "PlacementReceives",
|
||||
newName: "Firstname");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "citizenId",
|
||||
table: "PlacementReceives",
|
||||
newName: "CitizenId");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlacementReceives",
|
||||
keyColumn: "Lastname",
|
||||
keyValue: null,
|
||||
column: "Lastname",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Lastname",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "นามสกุล",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "นามสกุล")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlacementReceives",
|
||||
keyColumn: "Firstname",
|
||||
keyValue: null,
|
||||
column: "Firstname",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Firstname",
|
||||
table: "PlacementReceives",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "ชื่อ",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "ชื่อ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlacementReceives",
|
||||
keyColumn: "CitizenId",
|
||||
keyValue: null,
|
||||
column: "CitizenId",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "CitizenId",
|
||||
table: "PlacementReceives",
|
||||
type: "varchar(20)",
|
||||
maxLength: 20,
|
||||
nullable: false,
|
||||
comment: "เลขประจำตัวประชาชน",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "เลขบัตรประชาชน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "OrganizationPositionId",
|
||||
table: "PlacementReceives",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionLevelId",
|
||||
table: "PlacementReceives",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionLineId",
|
||||
table: "PlacementReceives",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionNumberId",
|
||||
table: "PlacementReceives",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionPathId",
|
||||
table: "PlacementReceives",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionPathSideId",
|
||||
table: "PlacementReceives",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionTypeId",
|
||||
table: "PlacementReceives",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PrefixId",
|
||||
table: "PlacementReceives",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementReceives_OrganizationPositionId",
|
||||
table: "PlacementReceives",
|
||||
column: "OrganizationPositionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementReceives_PositionLevelId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionLevelId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementReceives_PositionLineId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionLineId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementReceives_PositionNumberId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionNumberId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementReceives_PositionPathId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionPathId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementReceives_PositionPathSideId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionPathSideId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementReceives_PositionTypeId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementReceives_PrefixId",
|
||||
table: "PlacementReceives",
|
||||
column: "PrefixId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementReceives_OrganizationPositions_OrganizationPosition~",
|
||||
table: "PlacementReceives",
|
||||
column: "OrganizationPositionId",
|
||||
principalTable: "OrganizationPositions",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementReceives_PositionLevels_PositionLevelId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionLevelId",
|
||||
principalTable: "PositionLevels",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementReceives_PositionLines_PositionLineId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionLineId",
|
||||
principalTable: "PositionLines",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementReceives_PositionNumbers_PositionNumberId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionNumberId",
|
||||
principalTable: "PositionNumbers",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementReceives_PositionPathSides_PositionPathSideId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionPathSideId",
|
||||
principalTable: "PositionPathSides",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementReceives_PositionPaths_PositionPathId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionPathId",
|
||||
principalTable: "PositionPaths",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementReceives_PositionTypes_PositionTypeId",
|
||||
table: "PlacementReceives",
|
||||
column: "PositionTypeId",
|
||||
principalTable: "PositionTypes",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementReceives_Prefixes_PrefixId",
|
||||
table: "PlacementReceives",
|
||||
column: "PrefixId",
|
||||
principalTable: "Prefixes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue