182 lines
7.1 KiB
C#
182 lines
7.1 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BMA.EHR.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class updatetablePlacementProfileaddOccupationorg : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "OccupationCompany",
|
|
table: "PlacementProfiles");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OccupationDepartment",
|
|
table: "PlacementProfiles");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OccupationEmail",
|
|
table: "PlacementProfiles");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OccupationType",
|
|
table: "PlacementProfiles");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "OccupationTelephone",
|
|
table: "PlacementProfiles",
|
|
type: "varchar(20)",
|
|
maxLength: 20,
|
|
nullable: true,
|
|
comment: "โทรศัพท์ บริษัท",
|
|
oldClrType: typeof(string),
|
|
oldType: "varchar(200)",
|
|
oldMaxLength: 200,
|
|
oldNullable: true,
|
|
oldComment: "โทรศัพท์ บริษัท")
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "OccupationPosition",
|
|
table: "PlacementProfiles",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ตำแหน่งปัจจุบัน สังกัด",
|
|
oldClrType: typeof(string),
|
|
oldType: "longtext",
|
|
oldNullable: true,
|
|
oldComment: "ตำแหน่งอาชีพ")
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OccupationGroup",
|
|
table: "PlacementProfiles",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OccupationOrg",
|
|
table: "PlacementProfiles",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ตำแหน่งปัจจุบัน ชื่อตำแหน่ง")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OccupationPile",
|
|
table: "PlacementProfiles",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ตำแหน่งปัจจุบัน กอง")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OccupationPositionType",
|
|
table: "PlacementProfiles",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ตำแหน่งปัจจุบัน ประเภทราชการ")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "OccupationSalary",
|
|
table: "PlacementProfiles",
|
|
type: "int",
|
|
nullable: true,
|
|
comment: "ตำแหน่งปัจจุบัน เงินเดือน");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "OccupationGroup",
|
|
table: "PlacementProfiles");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OccupationOrg",
|
|
table: "PlacementProfiles");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OccupationPile",
|
|
table: "PlacementProfiles");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OccupationPositionType",
|
|
table: "PlacementProfiles");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OccupationSalary",
|
|
table: "PlacementProfiles");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "OccupationTelephone",
|
|
table: "PlacementProfiles",
|
|
type: "varchar(200)",
|
|
maxLength: 200,
|
|
nullable: true,
|
|
comment: "โทรศัพท์ บริษัท",
|
|
oldClrType: typeof(string),
|
|
oldType: "varchar(20)",
|
|
oldMaxLength: 20,
|
|
oldNullable: true,
|
|
oldComment: "โทรศัพท์ บริษัท")
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "OccupationPosition",
|
|
table: "PlacementProfiles",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ตำแหน่งอาชีพ",
|
|
oldClrType: typeof(string),
|
|
oldType: "longtext",
|
|
oldNullable: true,
|
|
oldComment: "ตำแหน่งปัจจุบัน สังกัด")
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OccupationCompany",
|
|
table: "PlacementProfiles",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "สำนัก/บริษัท บริษัท")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OccupationDepartment",
|
|
table: "PlacementProfiles",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "กอง/ฝ่าย บริษัท")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OccupationEmail",
|
|
table: "PlacementProfiles",
|
|
type: "varchar(200)",
|
|
maxLength: 200,
|
|
nullable: true,
|
|
comment: "อีเมล บริษัท")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OccupationType",
|
|
table: "PlacementProfiles",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ประเภทอาชีพที่ทำงานมาก่อน")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
}
|
|
}
|