mh_custom/wtmProject.DataAccess/Migrations/20240417073839_hmr2024041703.cs

47 lines
1.4 KiB
C#
Raw Normal View History

2024-05-16 17:30:33 +08:00
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace wtmProject.DataAccess.Migrations
{
public partial class hmr2024041703 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "AreaId",
table: "WTM_BILLING_LIST",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_WTM_BILLING_LIST_AreaId",
table: "WTM_BILLING_LIST",
column: "AreaId");
migrationBuilder.AddForeignKey(
name: "FK_WTM_BILLING_LIST_WTM_AREA_AreaId",
table: "WTM_BILLING_LIST",
column: "AreaId",
principalTable: "WTM_AREA",
principalColumn: "ID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_WTM_BILLING_LIST_WTM_AREA_AreaId",
table: "WTM_BILLING_LIST");
migrationBuilder.DropIndex(
name: "IX_WTM_BILLING_LIST_AreaId",
table: "WTM_BILLING_LIST");
migrationBuilder.DropColumn(
name: "AreaId",
table: "WTM_BILLING_LIST");
}
}
}