แก้บันทึกพ้นราชการ (ยังไม่เสร็จ)

This commit is contained in:
Kittapath 2023-08-03 09:35:54 +07:00
parent e55c0f746b
commit 2e7abdb60a
13 changed files with 12478 additions and 189 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,278 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updateTablepositionpathaddorder : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "PositionTypes",
type: "varchar(100)",
maxLength: 100,
nullable: false,
comment: "ชื่อประเภทตำแหน่ง",
oldClrType: typeof(string),
oldType: "varchar(100)",
oldMaxLength: 100,
oldComment: "ชื่อประเภทตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4")
.Annotation("Relational:ColumnOrder", 2)
.OldAnnotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("Relational:ColumnOrder", 1);
migrationBuilder.AlterColumn<bool>(
name: "IsActive",
table: "PositionTypes",
type: "tinyint(1)",
nullable: false,
comment: "สถานะการใช้งาน",
oldClrType: typeof(bool),
oldType: "tinyint(1)",
oldComment: "สถานะการใช้งาน")
.Annotation("Relational:ColumnOrder", 3)
.OldAnnotation("Relational:ColumnOrder", 2);
migrationBuilder.AddColumn<int>(
name: "Order",
table: "PositionTypes",
type: "int",
nullable: true,
comment: "ลำดับ")
.Annotation("Relational:ColumnOrder", 1);
migrationBuilder.AlterColumn<string>(
name: "ShortName",
table: "PositionLevels",
type: "varchar(100)",
maxLength: 100,
nullable: false,
comment: "ชื่อย่อระดับตำแหน่ง",
oldClrType: typeof(string),
oldType: "varchar(100)",
oldMaxLength: 100,
oldComment: "ชื่อย่อระดับตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4")
.Annotation("Relational:ColumnOrder", 3)
.OldAnnotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("Relational:ColumnOrder", 2);
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "PositionLevels",
type: "varchar(100)",
maxLength: 100,
nullable: false,
comment: "ชื่อระดับตำแหน่ง",
oldClrType: typeof(string),
oldType: "varchar(100)",
oldMaxLength: 100,
oldComment: "ชื่อระดับตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4")
.Annotation("Relational:ColumnOrder", 2)
.OldAnnotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("Relational:ColumnOrder", 1);
migrationBuilder.AlterColumn<int>(
name: "Level",
table: "PositionLevels",
type: "int",
nullable: false,
comment: "ลำดับชั้นของระดับตำแหน่ง",
oldClrType: typeof(int),
oldType: "int",
oldComment: "ลำดับชั้นของระดับตำแหน่ง")
.Annotation("Relational:ColumnOrder", 4)
.OldAnnotation("Relational:ColumnOrder", 3);
migrationBuilder.AlterColumn<bool>(
name: "IsActive",
table: "PositionLevels",
type: "tinyint(1)",
nullable: false,
comment: "สถานะการใช้งาน",
oldClrType: typeof(bool),
oldType: "tinyint(1)",
oldComment: "สถานะการใช้งาน")
.Annotation("Relational:ColumnOrder", 5)
.OldAnnotation("Relational:ColumnOrder", 4);
migrationBuilder.AddColumn<int>(
name: "Order",
table: "PositionLevels",
type: "int",
nullable: true,
comment: "ลำดับ")
.Annotation("Relational:ColumnOrder", 1);
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "PositionEmployeeLevels",
type: "varchar(100)",
maxLength: 100,
nullable: false,
comment: "ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ",
oldClrType: typeof(string),
oldType: "varchar(100)",
oldMaxLength: 100,
oldComment: "ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")
.Annotation("MySql:CharSet", "utf8mb4")
.Annotation("Relational:ColumnOrder", 2)
.OldAnnotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("Relational:ColumnOrder", 1);
migrationBuilder.AlterColumn<bool>(
name: "IsActive",
table: "PositionEmployeeLevels",
type: "tinyint(1)",
nullable: false,
comment: "สถานะการใช้งาน",
oldClrType: typeof(bool),
oldType: "tinyint(1)",
oldComment: "สถานะการใช้งาน")
.Annotation("Relational:ColumnOrder", 3)
.OldAnnotation("Relational:ColumnOrder", 2);
migrationBuilder.AddColumn<int>(
name: "Order",
table: "PositionEmployeeLevels",
type: "int",
nullable: true,
comment: "ลำดับ")
.Annotation("Relational:ColumnOrder", 1);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Order",
table: "PositionTypes");
migrationBuilder.DropColumn(
name: "Order",
table: "PositionLevels");
migrationBuilder.DropColumn(
name: "Order",
table: "PositionEmployeeLevels");
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "PositionTypes",
type: "varchar(100)",
maxLength: 100,
nullable: false,
comment: "ชื่อประเภทตำแหน่ง",
oldClrType: typeof(string),
oldType: "varchar(100)",
oldMaxLength: 100,
oldComment: "ชื่อประเภทตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4")
.Annotation("Relational:ColumnOrder", 1)
.OldAnnotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("Relational:ColumnOrder", 2);
migrationBuilder.AlterColumn<bool>(
name: "IsActive",
table: "PositionTypes",
type: "tinyint(1)",
nullable: false,
comment: "สถานะการใช้งาน",
oldClrType: typeof(bool),
oldType: "tinyint(1)",
oldComment: "สถานะการใช้งาน")
.Annotation("Relational:ColumnOrder", 2)
.OldAnnotation("Relational:ColumnOrder", 3);
migrationBuilder.AlterColumn<string>(
name: "ShortName",
table: "PositionLevels",
type: "varchar(100)",
maxLength: 100,
nullable: false,
comment: "ชื่อย่อระดับตำแหน่ง",
oldClrType: typeof(string),
oldType: "varchar(100)",
oldMaxLength: 100,
oldComment: "ชื่อย่อระดับตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4")
.Annotation("Relational:ColumnOrder", 2)
.OldAnnotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("Relational:ColumnOrder", 3);
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "PositionLevels",
type: "varchar(100)",
maxLength: 100,
nullable: false,
comment: "ชื่อระดับตำแหน่ง",
oldClrType: typeof(string),
oldType: "varchar(100)",
oldMaxLength: 100,
oldComment: "ชื่อระดับตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4")
.Annotation("Relational:ColumnOrder", 1)
.OldAnnotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("Relational:ColumnOrder", 2);
migrationBuilder.AlterColumn<int>(
name: "Level",
table: "PositionLevels",
type: "int",
nullable: false,
comment: "ลำดับชั้นของระดับตำแหน่ง",
oldClrType: typeof(int),
oldType: "int",
oldComment: "ลำดับชั้นของระดับตำแหน่ง")
.Annotation("Relational:ColumnOrder", 3)
.OldAnnotation("Relational:ColumnOrder", 4);
migrationBuilder.AlterColumn<bool>(
name: "IsActive",
table: "PositionLevels",
type: "tinyint(1)",
nullable: false,
comment: "สถานะการใช้งาน",
oldClrType: typeof(bool),
oldType: "tinyint(1)",
oldComment: "สถานะการใช้งาน")
.Annotation("Relational:ColumnOrder", 4)
.OldAnnotation("Relational:ColumnOrder", 5);
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "PositionEmployeeLevels",
type: "varchar(100)",
maxLength: 100,
nullable: false,
comment: "ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ",
oldClrType: typeof(string),
oldType: "varchar(100)",
oldMaxLength: 100,
oldComment: "ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ")
.Annotation("MySql:CharSet", "utf8mb4")
.Annotation("Relational:ColumnOrder", 1)
.OldAnnotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("Relational:ColumnOrder", 2);
migrationBuilder.AlterColumn<bool>(
name: "IsActive",
table: "PositionEmployeeLevels",
type: "tinyint(1)",
nullable: false,
comment: "สถานะการใช้งาน",
oldClrType: typeof(bool),
oldType: "tinyint(1)",
oldComment: "สถานะการใช้งาน")
.Annotation("Relational:ColumnOrder", 2)
.OldAnnotation("Relational:ColumnOrder", 3);
}
}
}

View file

@ -6534,7 +6534,7 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasColumnOrder(3)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
@ -6560,9 +6560,14 @@ namespace BMA.EHR.Infrastructure.Migrations
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasColumnOrder(2)
.HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ");
b.Property<int?>("Order")
.HasColumnType("int")
.HasColumnOrder(1)
.HasComment("ลำดับ");
b.HasKey("Id");
b.ToTable("PositionEmployeeLevels");
@ -7000,7 +7005,7 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(4)
.HasColumnOrder(5)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
@ -7024,21 +7029,26 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<int>("Level")
.HasColumnType("int")
.HasColumnOrder(3)
.HasColumnOrder(4)
.HasComment("ลำดับชั้นของระดับตำแหน่ง");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasColumnOrder(2)
.HasComment("ชื่อระดับตำแหน่ง");
b.Property<int?>("Order")
.HasColumnType("int")
.HasColumnOrder(1)
.HasComment("ลำดับ");
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(2)
.HasColumnOrder(3)
.HasComment("ชื่อย่อระดับตำแหน่ง");
b.HasKey("Id");
@ -7344,7 +7354,7 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)")
.HasColumnOrder(2)
.HasColumnOrder(3)
.HasComment("สถานะการใช้งาน");
b.Property<string>("LastUpdateFullName")
@ -7370,9 +7380,14 @@ namespace BMA.EHR.Infrastructure.Migrations
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnOrder(1)
.HasColumnOrder(2)
.HasComment("ชื่อประเภทตำแหน่ง");
b.Property<int?>("Order")
.HasColumnType("int")
.HasColumnOrder(1)
.HasComment("ลำดับ");
b.HasKey("Id");
b.ToTable("PositionTypes");