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

90 lines
2.7 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace wtmProject.DataAccess.Migrations
{
public partial class hmr2024032703 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Address",
table: "FrameworkUsers");
migrationBuilder.DropColumn(
name: "Email",
table: "FrameworkUsers");
migrationBuilder.DropColumn(
name: "HomePhone",
table: "FrameworkUsers");
migrationBuilder.DropColumn(
name: "ZipCode",
table: "FrameworkUsers");
migrationBuilder.AddColumn<Guid>(
name: "GroupId",
table: "FrameworkUsers",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_FrameworkUsers_GroupId",
table: "FrameworkUsers",
column: "GroupId");
migrationBuilder.AddForeignKey(
name: "FK_FrameworkUsers_FrameworkUserGroups_GroupId",
table: "FrameworkUsers",
column: "GroupId",
principalTable: "FrameworkUserGroups",
principalColumn: "ID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_FrameworkUsers_FrameworkUserGroups_GroupId",
table: "FrameworkUsers");
migrationBuilder.DropIndex(
name: "IX_FrameworkUsers_GroupId",
table: "FrameworkUsers");
migrationBuilder.DropColumn(
name: "GroupId",
table: "FrameworkUsers");
migrationBuilder.AddColumn<string>(
name: "Address",
table: "FrameworkUsers",
type: "nvarchar(200)",
maxLength: 200,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Email",
table: "FrameworkUsers",
type: "nvarchar(50)",
maxLength: 50,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "HomePhone",
table: "FrameworkUsers",
type: "nvarchar(30)",
maxLength: 30,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ZipCode",
table: "FrameworkUsers",
type: "nvarchar(max)",
nullable: true);
}
}
}