46 lines
1.5 KiB
C#
46 lines
1.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace APT.Data.Migrations.Migrations
|
|
{
|
|
public partial class hmr2025073101 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "AREA_ID",
|
|
table: "T_SK_CHECK_CONTENTS",
|
|
type: "uniqueidentifier",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_SK_CHECK_CONTENTS_AREA_ID",
|
|
table: "T_SK_CHECK_CONTENTS",
|
|
column: "AREA_ID");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_T_SK_CHECK_CONTENTS_T_SK_RISK_AREA_AREA_ID",
|
|
table: "T_SK_CHECK_CONTENTS",
|
|
column: "AREA_ID",
|
|
principalTable: "T_SK_RISK_AREA",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_T_SK_CHECK_CONTENTS_T_SK_RISK_AREA_AREA_ID",
|
|
table: "T_SK_CHECK_CONTENTS");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_T_SK_CHECK_CONTENTS_AREA_ID",
|
|
table: "T_SK_CHECK_CONTENTS");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "AREA_ID",
|
|
table: "T_SK_CHECK_CONTENTS");
|
|
}
|
|
}
|
|
}
|