134 lines
4.7 KiB
C#
134 lines
4.7 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace APT.Data.Migrations.Migrations
|
|
{
|
|
public partial class hmr2025121001 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_SECURITY_INSPECTION_RECORD_SUMMARY",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_SECURITY_INSPECTION_RECORD",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_SECURITY_INSPECTION_NOTICE",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_HIDDEN_DANGER_REPORT",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_HIDDEN_DANGER_RECTIFY_RECORD",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_HIDDEN_DANGER_RECTIFY_NOTICE",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_HIDDEN_DANGER_HAND_REPORT",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_HIDDEN_DANGER_CONFIRM",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "FIRE_JOB_ID",
|
|
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE",
|
|
type: "uniqueidentifier",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_FO_TECH_DISCLOSURE_FROM_SAFE_FIRE_JOB_ID",
|
|
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE",
|
|
column: "FIRE_JOB_ID");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_T_FO_TECH_DISCLOSURE_FROM_SAFE_T_FO_FIRE_JOB_FIRE_JOB_ID",
|
|
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE",
|
|
column: "FIRE_JOB_ID",
|
|
principalTable: "T_FO_FIRE_JOB",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_T_FO_TECH_DISCLOSURE_FROM_SAFE_T_FO_FIRE_JOB_FIRE_JOB_ID",
|
|
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_T_FO_TECH_DISCLOSURE_FROM_SAFE_FIRE_JOB_ID",
|
|
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_SECURITY_INSPECTION_RECORD_SUMMARY");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_SECURITY_INSPECTION_RECORD");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_SECURITY_INSPECTION_NOTICE");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_HIDDEN_DANGER_REPORT");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_HIDDEN_DANGER_RECTIFY_RECORD");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_HIDDEN_DANGER_RECTIFY_NOTICE");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_HIDDEN_DANGER_HAND_REPORT");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "NOTICE_CODE",
|
|
table: "T_SK_HIDDEN_DANGER_CONFIRM");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "FIRE_JOB_ID",
|
|
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE");
|
|
}
|
|
}
|
|
}
|