78 lines
2.5 KiB
C#
78 lines
2.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace APT.Data.Migrations.Migrations
|
|
{
|
|
public partial class wyw2025082201 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "CHECK_TYPE_ID",
|
|
table: "T_WB_SAFE_CHECK",
|
|
type: "uniqueidentifier",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "CODE",
|
|
table: "T_WB_SAFE_CHECK",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "NAME",
|
|
table: "T_WB_SAFE_CHECK",
|
|
type: "nvarchar(200)",
|
|
maxLength: 200,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "PLAN_SET_ID",
|
|
table: "T_WB_SAFE_CHECK",
|
|
type: "uniqueidentifier",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_WB_SAFE_CHECK_CHECK_TYPE_ID",
|
|
table: "T_WB_SAFE_CHECK",
|
|
column: "CHECK_TYPE_ID");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_T_WB_SAFE_CHECK_T_WB_CHECK_TYPE_CHECK_TYPE_ID",
|
|
table: "T_WB_SAFE_CHECK",
|
|
column: "CHECK_TYPE_ID",
|
|
principalTable: "T_WB_CHECK_TYPE",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_T_WB_SAFE_CHECK_T_WB_CHECK_TYPE_CHECK_TYPE_ID",
|
|
table: "T_WB_SAFE_CHECK");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_T_WB_SAFE_CHECK_CHECK_TYPE_ID",
|
|
table: "T_WB_SAFE_CHECK");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CHECK_TYPE_ID",
|
|
table: "T_WB_SAFE_CHECK");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CODE",
|
|
table: "T_WB_SAFE_CHECK");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "NAME",
|
|
table: "T_WB_SAFE_CHECK");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PLAN_SET_ID",
|
|
table: "T_WB_SAFE_CHECK");
|
|
}
|
|
}
|
|
}
|