mh_custom/wtmProject.DataAccess/Migrations/20240401035435_hmr2024040103.cs
2024-05-17 13:43:36 +08:00

47 lines
1.3 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace wtmProject.DataAccess.Migrations
{
public partial class hmr2024040103 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "AreaId",
table: "WTM_BUSINESS",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_WTM_BUSINESS_AreaId",
table: "WTM_BUSINESS",
column: "AreaId");
migrationBuilder.AddForeignKey(
name: "FK_WTM_BUSINESS_WTM_AREA_AreaId",
table: "WTM_BUSINESS",
column: "AreaId",
principalTable: "WTM_AREA",
principalColumn: "ID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_WTM_BUSINESS_WTM_AREA_AreaId",
table: "WTM_BUSINESS");
migrationBuilder.DropIndex(
name: "IX_WTM_BUSINESS_AreaId",
table: "WTM_BUSINESS");
migrationBuilder.DropColumn(
name: "AreaId",
table: "WTM_BUSINESS");
}
}
}