214 lines
7.7 KiB
C#
214 lines
7.7 KiB
C#
|
|
using System;
|
|||
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|
|||
|
|
#nullable disable
|
|||
|
|
|
|||
|
|
namespace wtmProject.DataAccess.Migrations
|
|||
|
|
{
|
|||
|
|
public partial class hmr2025011302 : Migration
|
|||
|
|
{
|
|||
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.DropForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_FrameworkUsers_MarkManageId",
|
|||
|
|
table: "WTM_BUSINESS");
|
|||
|
|
|
|||
|
|
migrationBuilder.DropForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_WTM_CUSTOM_CustomId",
|
|||
|
|
table: "WTM_BUSINESS");
|
|||
|
|
|
|||
|
|
migrationBuilder.DropForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_WTM_PROJECT_ProjectId",
|
|||
|
|
table: "WTM_BUSINESS");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<Guid>(
|
|||
|
|
name: "ProjectId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "uniqueidentifier",
|
|||
|
|
nullable: false,
|
|||
|
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|||
|
|
oldClrType: typeof(Guid),
|
|||
|
|
oldType: "uniqueidentifier",
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<Guid>(
|
|||
|
|
name: "MarkManageId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "uniqueidentifier",
|
|||
|
|
nullable: false,
|
|||
|
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|||
|
|
oldClrType: typeof(Guid),
|
|||
|
|
oldType: "uniqueidentifier",
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|||
|
|
name: "GetDate",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "datetime2",
|
|||
|
|
nullable: false,
|
|||
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|||
|
|
oldClrType: typeof(DateTime),
|
|||
|
|
oldType: "datetime2",
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<Guid>(
|
|||
|
|
name: "CustomId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "uniqueidentifier",
|
|||
|
|
nullable: false,
|
|||
|
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|||
|
|
oldClrType: typeof(Guid),
|
|||
|
|
oldType: "uniqueidentifier",
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<int>(
|
|||
|
|
name: "BusinessStatus",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "int",
|
|||
|
|
nullable: false,
|
|||
|
|
defaultValue: 0,
|
|||
|
|
oldClrType: typeof(int),
|
|||
|
|
oldType: "int",
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
name: "BusinessName",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "nvarchar(max)",
|
|||
|
|
nullable: false,
|
|||
|
|
defaultValue: "",
|
|||
|
|
oldClrType: typeof(string),
|
|||
|
|
oldType: "nvarchar(max)",
|
|||
|
|
oldNullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AddColumn<string>(
|
|||
|
|
name: "ActSignDateStr",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "nvarchar(max)",
|
|||
|
|
nullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AddColumn<string>(
|
|||
|
|
name: "PreSignDateStr",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "nvarchar(max)",
|
|||
|
|
nullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.AddForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_FrameworkUsers_MarkManageId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
column: "MarkManageId",
|
|||
|
|
principalTable: "FrameworkUsers",
|
|||
|
|
principalColumn: "ID",
|
|||
|
|
onDelete: ReferentialAction.Cascade);
|
|||
|
|
|
|||
|
|
migrationBuilder.AddForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_WTM_CUSTOM_CustomId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
column: "CustomId",
|
|||
|
|
principalTable: "WTM_CUSTOM",
|
|||
|
|
principalColumn: "ID",
|
|||
|
|
onDelete: ReferentialAction.Cascade);
|
|||
|
|
|
|||
|
|
migrationBuilder.AddForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_WTM_PROJECT_ProjectId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
column: "ProjectId",
|
|||
|
|
principalTable: "WTM_PROJECT",
|
|||
|
|
principalColumn: "ID",
|
|||
|
|
onDelete: ReferentialAction.Cascade);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.DropForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_FrameworkUsers_MarkManageId",
|
|||
|
|
table: "WTM_BUSINESS");
|
|||
|
|
|
|||
|
|
migrationBuilder.DropForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_WTM_CUSTOM_CustomId",
|
|||
|
|
table: "WTM_BUSINESS");
|
|||
|
|
|
|||
|
|
migrationBuilder.DropForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_WTM_PROJECT_ProjectId",
|
|||
|
|
table: "WTM_BUSINESS");
|
|||
|
|
|
|||
|
|
migrationBuilder.DropColumn(
|
|||
|
|
name: "ActSignDateStr",
|
|||
|
|
table: "WTM_BUSINESS");
|
|||
|
|
|
|||
|
|
migrationBuilder.DropColumn(
|
|||
|
|
name: "PreSignDateStr",
|
|||
|
|
table: "WTM_BUSINESS");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<Guid>(
|
|||
|
|
name: "ProjectId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "uniqueidentifier",
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(Guid),
|
|||
|
|
oldType: "uniqueidentifier");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<Guid>(
|
|||
|
|
name: "MarkManageId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "uniqueidentifier",
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(Guid),
|
|||
|
|
oldType: "uniqueidentifier");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|||
|
|
name: "GetDate",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "datetime2",
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(DateTime),
|
|||
|
|
oldType: "datetime2");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<Guid>(
|
|||
|
|
name: "CustomId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "uniqueidentifier",
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(Guid),
|
|||
|
|
oldType: "uniqueidentifier");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<int>(
|
|||
|
|
name: "BusinessStatus",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "int",
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(int),
|
|||
|
|
oldType: "int");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<string>(
|
|||
|
|
name: "BusinessName",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
type: "nvarchar(max)",
|
|||
|
|
nullable: true,
|
|||
|
|
oldClrType: typeof(string),
|
|||
|
|
oldType: "nvarchar(max)");
|
|||
|
|
|
|||
|
|
migrationBuilder.AddForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_FrameworkUsers_MarkManageId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
column: "MarkManageId",
|
|||
|
|
principalTable: "FrameworkUsers",
|
|||
|
|
principalColumn: "ID");
|
|||
|
|
|
|||
|
|
migrationBuilder.AddForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_WTM_CUSTOM_CustomId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
column: "CustomId",
|
|||
|
|
principalTable: "WTM_CUSTOM",
|
|||
|
|
principalColumn: "ID");
|
|||
|
|
|
|||
|
|
migrationBuilder.AddForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_WTM_PROJECT_ProjectId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
column: "ProjectId",
|
|||
|
|
principalTable: "WTM_PROJECT",
|
|||
|
|
principalColumn: "ID");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|