194 lines
6.7 KiB
C#
194 lines
6.7 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BMA.EHR.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class updatetableperiodinsignaupdateround : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
// migrationBuilder.AddColumn<bool>(
|
|
// name: "IsActive",
|
|
// table: "ProfileSalaries",
|
|
// type: "tinyint(1)",
|
|
// nullable: false,
|
|
// defaultValue: false);
|
|
|
|
// migrationBuilder.AddColumn<string>(
|
|
// name: "CoupleCitizenId",
|
|
// table: "Profiles",
|
|
// type: "varchar(20)",
|
|
// maxLength: 20,
|
|
// nullable: true,
|
|
// comment: "เลขที่บัตรประชาชนคู่สมรส")
|
|
// .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
// migrationBuilder.AddColumn<bool>(
|
|
// name: "CoupleLive",
|
|
// table: "Profiles",
|
|
// type: "tinyint(1)",
|
|
// nullable: false,
|
|
// defaultValue: false,
|
|
// comment: "มีชีวิตคู่สมรส");
|
|
|
|
// migrationBuilder.AddColumn<string>(
|
|
// name: "FatherCitizenId",
|
|
// table: "Profiles",
|
|
// type: "varchar(20)",
|
|
// maxLength: 20,
|
|
// nullable: true,
|
|
// comment: "เลขที่บัตรประชาชนบิดา")
|
|
// .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
// migrationBuilder.AddColumn<bool>(
|
|
// name: "FatherLive",
|
|
// table: "Profiles",
|
|
// type: "tinyint(1)",
|
|
// nullable: false,
|
|
// defaultValue: false,
|
|
// comment: "มีชีวิตบิดา");
|
|
|
|
// migrationBuilder.AddColumn<string>(
|
|
// name: "MotherCitizenId",
|
|
// table: "Profiles",
|
|
// type: "varchar(20)",
|
|
// maxLength: 20,
|
|
// nullable: true,
|
|
// comment: "เลขที่บัตรประชาชนมารดา")
|
|
// .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
// migrationBuilder.AddColumn<bool>(
|
|
// name: "MotherLive",
|
|
// table: "Profiles",
|
|
// type: "tinyint(1)",
|
|
// nullable: false,
|
|
// defaultValue: false,
|
|
// comment: "มีชีวิตมารดา");
|
|
|
|
// migrationBuilder.AddColumn<bool>(
|
|
// name: "IsActive",
|
|
// table: "ProfilePositions",
|
|
// type: "tinyint(1)",
|
|
// nullable: false,
|
|
// defaultValue: false);
|
|
|
|
// migrationBuilder.AddColumn<bool>(
|
|
// name: "IsPublished",
|
|
// table: "ProfilePositions",
|
|
// type: "tinyint(1)",
|
|
// nullable: false,
|
|
// defaultValue: false);
|
|
|
|
// migrationBuilder.AddColumn<bool>(
|
|
// name: "IsActive",
|
|
// table: "ProfileEducations",
|
|
// type: "tinyint(1)",
|
|
// nullable: false,
|
|
// defaultValue: false);
|
|
|
|
// migrationBuilder.AddColumn<bool>(
|
|
// name: "IsActive",
|
|
// table: "ProfileCertificates",
|
|
// type: "tinyint(1)",
|
|
// nullable: false,
|
|
// defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Status",
|
|
table: "InsigniaRequestProfiles",
|
|
type: "longtext",
|
|
nullable: false,
|
|
comment: "สถานะตำแหน่งที่ยื่นขอ")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "Amount",
|
|
table: "InsigniaPeriods",
|
|
type: "int",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "varchar(50)",
|
|
oldMaxLength: 50)
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "Round",
|
|
table: "InsigniaPeriods",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
comment: "ราบการยื่นขอ");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
// migrationBuilder.DropColumn(
|
|
// name: "IsActive",
|
|
// table: "ProfileSalaries");
|
|
|
|
// migrationBuilder.DropColumn(
|
|
// name: "CoupleCitizenId",
|
|
// table: "Profiles");
|
|
|
|
// migrationBuilder.DropColumn(
|
|
// name: "CoupleLive",
|
|
// table: "Profiles");
|
|
|
|
// migrationBuilder.DropColumn(
|
|
// name: "FatherCitizenId",
|
|
// table: "Profiles");
|
|
|
|
// migrationBuilder.DropColumn(
|
|
// name: "FatherLive",
|
|
// table: "Profiles");
|
|
|
|
// migrationBuilder.DropColumn(
|
|
// name: "MotherCitizenId",
|
|
// table: "Profiles");
|
|
|
|
// migrationBuilder.DropColumn(
|
|
// name: "MotherLive",
|
|
// table: "Profiles");
|
|
|
|
// migrationBuilder.DropColumn(
|
|
// name: "IsActive",
|
|
// table: "ProfilePositions");
|
|
|
|
// migrationBuilder.DropColumn(
|
|
// name: "IsPublished",
|
|
// table: "ProfilePositions");
|
|
|
|
// migrationBuilder.DropColumn(
|
|
// name: "IsActive",
|
|
// table: "ProfileEducations");
|
|
|
|
// migrationBuilder.DropColumn(
|
|
// name: "IsActive",
|
|
// table: "ProfileCertificates");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Status",
|
|
table: "InsigniaRequestProfiles");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Round",
|
|
table: "InsigniaPeriods");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Amount",
|
|
table: "InsigniaPeriods",
|
|
type: "varchar(50)",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
oldClrType: typeof(int),
|
|
oldType: "int",
|
|
oldMaxLength: 50)
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
}
|
|
}
|