mh_custom/wtmProject.DataAccess/Migrations/20240410070946_hmr2024031001.cs

47 lines
1.3 KiB
C#
Raw Permalink 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 hmr2024031001 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "CustomId",
table: "WTM_CUSTOM",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_WTM_CUSTOM_CustomId",
table: "WTM_CUSTOM",
column: "CustomId");
migrationBuilder.AddForeignKey(
name: "FK_WTM_CUSTOM_WTM_CUSTOM_CustomId",
table: "WTM_CUSTOM",
column: "CustomId",
principalTable: "WTM_CUSTOM",
principalColumn: "ID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_WTM_CUSTOM_WTM_CUSTOM_CustomId",
table: "WTM_CUSTOM");
migrationBuilder.DropIndex(
name: "IX_WTM_CUSTOM_CustomId",
table: "WTM_CUSTOM");
migrationBuilder.DropColumn(
name: "CustomId",
table: "WTM_CUSTOM");
}
}
}