hrms-api-backend/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20260717041310_AddChildDnaIdsToDiscipline.cs
harid bea7960ea7
All checks were successful
Build & Deploy Discipline Service / build (push) Successful in 2m16s
Migrate & Fix รายการวินัยม่ได้กรองสิทธิ์รายการ #7
2026-07-17 15:35:36 +07:00

163 lines
5.3 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class AddChildDnaIdsToDiscipline : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "Child1DnaId",
table: "DisciplineInvestigates",
type: "char(36)",
nullable: true,
comment: "Child1DnaId",
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child2DnaId",
table: "DisciplineInvestigates",
type: "char(36)",
nullable: true,
comment: "Child2DnaId",
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child3DnaId",
table: "DisciplineInvestigates",
type: "char(36)",
nullable: true,
comment: "Child3DnaId",
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child4DnaId",
table: "DisciplineInvestigates",
type: "char(36)",
nullable: true,
comment: "Child4DnaId",
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child1DnaId",
table: "DisciplineDisciplinarys",
type: "char(36)",
nullable: true,
comment: "Child1DnaId",
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child2DnaId",
table: "DisciplineDisciplinarys",
type: "char(36)",
nullable: true,
comment: "Child2DnaId",
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child3DnaId",
table: "DisciplineDisciplinarys",
type: "char(36)",
nullable: true,
comment: "Child3DnaId",
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child4DnaId",
table: "DisciplineDisciplinarys",
type: "char(36)",
nullable: true,
comment: "Child4DnaId",
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child1DnaId",
table: "DisciplineComplaints",
type: "char(36)",
nullable: true,
comment: "Child1DnaId",
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child2DnaId",
table: "DisciplineComplaints",
type: "char(36)",
nullable: true,
comment: "Child2DnaId",
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child3DnaId",
table: "DisciplineComplaints",
type: "char(36)",
nullable: true,
comment: "Child3DnaId",
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child4DnaId",
table: "DisciplineComplaints",
type: "char(36)",
nullable: true,
comment: "Child4DnaId",
collation: "ascii_general_ci");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Child1DnaId",
table: "DisciplineInvestigates");
migrationBuilder.DropColumn(
name: "Child2DnaId",
table: "DisciplineInvestigates");
migrationBuilder.DropColumn(
name: "Child3DnaId",
table: "DisciplineInvestigates");
migrationBuilder.DropColumn(
name: "Child4DnaId",
table: "DisciplineInvestigates");
migrationBuilder.DropColumn(
name: "Child1DnaId",
table: "DisciplineDisciplinarys");
migrationBuilder.DropColumn(
name: "Child2DnaId",
table: "DisciplineDisciplinarys");
migrationBuilder.DropColumn(
name: "Child3DnaId",
table: "DisciplineDisciplinarys");
migrationBuilder.DropColumn(
name: "Child4DnaId",
table: "DisciplineDisciplinarys");
migrationBuilder.DropColumn(
name: "Child1DnaId",
table: "DisciplineComplaints");
migrationBuilder.DropColumn(
name: "Child2DnaId",
table: "DisciplineComplaints");
migrationBuilder.DropColumn(
name: "Child3DnaId",
table: "DisciplineComplaints");
migrationBuilder.DropColumn(
name: "Child4DnaId",
table: "DisciplineComplaints");
}
}
}