placement ผูกโครงสร้างใหม่

This commit is contained in:
Kittapath 2024-04-30 00:10:07 +07:00
parent 0afe06fac0
commit dc91f81262
11 changed files with 35152 additions and 86 deletions

View file

@ -0,0 +1,321 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetablePlacementProfilesaddorg : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "positionId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id ตำแหน่ง",
oldClrType: typeof(Guid),
oldType: "char(36)",
oldNullable: true,
oldComment: "id ตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("Relational:Collation", "ascii_general_ci");
migrationBuilder.AddColumn<string>(
name: "child1",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child1")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1Id",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1ShortName",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อย่อหน่วยงาน child1")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child2")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2Id",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2ShortName",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อย่อหน่วยงาน child2")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child3")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3Id",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3ShortName",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อย่อหน่วยงาน child3")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child4")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4Id",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4ShortName",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อย่อหน่วยงาน child4")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "orgRevisionId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id revision")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "posLevelId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id ระดับตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "posLevelName",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อระดับตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "posMasterNo",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "เลขที่ตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "posTypeId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id ประเภทตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "posTypeName",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อประเภทตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "positionField",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "สายงาน")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "positionName",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อตำแหน่งในสายงาน")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "root",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน root")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootShortName",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อย่อหน่วยงาน root")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "child1",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child1Id",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child1ShortName",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child2",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child2Id",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child2ShortName",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child3",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child3Id",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child3ShortName",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child4",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child4Id",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child4ShortName",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "orgRevisionId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "posLevelId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "posLevelName",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "posMasterNo",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "posTypeId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "posTypeName",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "positionField",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "positionName",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "root",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "rootId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "rootShortName",
table: "PlacementProfiles");
migrationBuilder.AlterColumn<Guid>(
name: "positionId",
table: "PlacementProfiles",
type: "char(36)",
nullable: true,
comment: "id ตำแหน่ง",
collation: "ascii_general_ci",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "id ตำแหน่ง")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}

View file

@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetablePlacementProfilesaddorg1 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "posMasterNo",
table: "PlacementProfiles",
type: "int",
nullable: true,
comment: "เลขที่ตำแหน่ง",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "เลขที่ตำแหน่ง")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "posMasterNo",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "เลขที่ตำแหน่ง",
oldClrType: typeof(int),
oldType: "int",
oldNullable: true,
oldComment: "เลขที่ตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4");
}
}
}

View file

@ -12133,6 +12133,54 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("varchar(200)")
.HasComment("โทรศัพท์");
b.Property<string>("child1")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child1ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1");
b.Property<string>("child2")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child2ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2");
b.Property<string>("child3")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child3ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3");
b.Property<string>("child4")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("child4ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child4");
b.Property<int?>("node")
.HasColumnType("int")
.HasComment("ระดับโครงสร้าง");
@ -12141,6 +12189,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("char(36)")
.HasComment("id โครงสร้าง");
b.Property<string>("orgRevisionId")
.HasColumnType("longtext")
.HasComment("id revision");
b.Property<string>("orgTreeShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน");
@ -12149,14 +12201,54 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน");
b.Property<Guid?>("positionId")
.HasColumnType("char(36)")
b.Property<string>("posLevelId")
.HasColumnType("longtext")
.HasComment("id ระดับตำแหน่ง");
b.Property<string>("posLevelName")
.HasColumnType("longtext")
.HasComment("ชื่อระดับตำแหน่ง");
b.Property<int?>("posMasterNo")
.HasColumnType("int")
.HasComment("เลขที่ตำแหน่ง");
b.Property<string>("posTypeId")
.HasColumnType("longtext")
.HasComment("id ประเภทตำแหน่ง");
b.Property<string>("posTypeName")
.HasColumnType("longtext")
.HasComment("ชื่อประเภทตำแหน่ง");
b.Property<string>("positionField")
.HasColumnType("longtext")
.HasComment("สายงาน");
b.Property<string>("positionId")
.HasColumnType("longtext")
.HasComment("id ตำแหน่ง");
b.Property<string>("positionName")
.HasColumnType("longtext")
.HasComment("ชื่อตำแหน่งในสายงาน");
b.Property<Guid?>("posmasterId")
.HasColumnType("char(36)")
.HasComment("id อัตรากำลัง");
b.Property<string>("root")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.Property<string>("rootShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน root");
b.HasKey("Id");
b.HasIndex("BloodGroupId");