hrms-api-backend/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417101128_update_table_disciplineresult_add_remark.cs
2025-04-17 18:05:42 +07:00

86 lines
3.4 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class update_table_disciplineresult_add_remark : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "DocumentRejectId",
table: "DisciplineInvestigate_ProfileComplaints",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<string>(
name: "RemarkReject",
table: "DisciplineInvestigate_ProfileComplaints",
type: "longtext",
nullable: true,
comment: "หมายเหตุยุติเรื่อง")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Offense",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates",
type: "longtext",
nullable: true,
comment: "ฐานความผิดรายบุคคล")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Remark",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates",
type: "longtext",
nullable: true,
comment: "ฐานความผิดรายบุคคลหมายเหตุ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_DisciplineInvestigate_ProfileComplaints_DocumentRejectId",
table: "DisciplineInvestigate_ProfileComplaints",
column: "DocumentRejectId");
migrationBuilder.AddForeignKey(
name: "FK_DisciplineInvestigate_ProfileComplaints_Documents_DocumentRe~",
table: "DisciplineInvestigate_ProfileComplaints",
column: "DocumentRejectId",
principalTable: "Documents",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DisciplineInvestigate_ProfileComplaints_Documents_DocumentRe~",
table: "DisciplineInvestigate_ProfileComplaints");
migrationBuilder.DropIndex(
name: "IX_DisciplineInvestigate_ProfileComplaints_DocumentRejectId",
table: "DisciplineInvestigate_ProfileComplaints");
migrationBuilder.DropColumn(
name: "DocumentRejectId",
table: "DisciplineInvestigate_ProfileComplaints");
migrationBuilder.DropColumn(
name: "RemarkReject",
table: "DisciplineInvestigate_ProfileComplaints");
migrationBuilder.DropColumn(
name: "Offense",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates");
migrationBuilder.DropColumn(
name: "Remark",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates");
}
}
}