83 lines
3.1 KiB
C#
83 lines
3.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace APT.Data.Migrations.Migrations
|
|
{
|
|
public partial class hmr2025111302 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_T_FO_FIRE_JOB_USER_T_FO_USER_TYPE_USER_TYPE_ID",
|
|
table: "T_FO_FIRE_JOB_USER");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_T_FO_FIRE_JOB_WB_USER_T_FO_USER_TYPE_USER_TYPE_ID",
|
|
table: "T_FO_FIRE_JOB_WB_USER");
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "USER_TYPE_ID",
|
|
table: "T_FM_USER",
|
|
type: "uniqueidentifier",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "USER_TYPE_NAME",
|
|
table: "T_FM_USER",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_T_FO_FIRE_JOB_USER_T_OG_RELATED_USER_TYPE_USER_TYPE_ID",
|
|
table: "T_FO_FIRE_JOB_USER",
|
|
column: "USER_TYPE_ID",
|
|
principalTable: "T_OG_RELATED_USER_TYPE",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_T_FO_FIRE_JOB_WB_USER_T_OG_RELATED_USER_TYPE_USER_TYPE_ID",
|
|
table: "T_FO_FIRE_JOB_WB_USER",
|
|
column: "USER_TYPE_ID",
|
|
principalTable: "T_OG_RELATED_USER_TYPE",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_T_FO_FIRE_JOB_USER_T_OG_RELATED_USER_TYPE_USER_TYPE_ID",
|
|
table: "T_FO_FIRE_JOB_USER");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_T_FO_FIRE_JOB_WB_USER_T_OG_RELATED_USER_TYPE_USER_TYPE_ID",
|
|
table: "T_FO_FIRE_JOB_WB_USER");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "USER_TYPE_ID",
|
|
table: "T_FM_USER");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "USER_TYPE_NAME",
|
|
table: "T_FM_USER");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_T_FO_FIRE_JOB_USER_T_FO_USER_TYPE_USER_TYPE_ID",
|
|
table: "T_FO_FIRE_JOB_USER",
|
|
column: "USER_TYPE_ID",
|
|
principalTable: "T_FO_USER_TYPE",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_T_FO_FIRE_JOB_WB_USER_T_FO_USER_TYPE_USER_TYPE_ID",
|
|
table: "T_FO_FIRE_JOB_WB_USER",
|
|
column: "USER_TYPE_ID",
|
|
principalTable: "T_FO_USER_TYPE",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
}
|
|
}
|