You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
364 lines
12 KiB
364 lines
12 KiB
3 years ago
|
using System;
|
||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||
|
|
||
|
namespace Win_in.Sfs.Scp.WebApi.Migrations
|
||
|
{
|
||
|
public partial class _20211021002 : Migration
|
||
|
{
|
||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||
|
{
|
||
|
migrationBuilder.DropIndex(
|
||
|
name: "IX_WebApi_SupplierPart_SupplierCode_PartCode",
|
||
|
table: "WebApi_SupplierPart");
|
||
|
|
||
|
migrationBuilder.DropIndex(
|
||
|
name: "IX_WebApi_Receipt_RcNumber_PoLine_PartCode",
|
||
|
table: "WebApi_Receipt");
|
||
|
|
||
|
migrationBuilder.DropIndex(
|
||
|
name: "IX_WebApi_PO_PoNumber",
|
||
|
table: "WebApi_PO");
|
||
|
|
||
|
migrationBuilder.DropIndex(
|
||
|
name: "IX_WebApi_Part_Code",
|
||
|
table: "WebApi_Part");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DeleterId",
|
||
|
table: "WebApi_Suppliers");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DeletionTime",
|
||
|
table: "WebApi_Suppliers");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "IsDeleted",
|
||
|
table: "WebApi_Suppliers");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DeleterId",
|
||
|
table: "WebApi_SupplierPart");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DeletionTime",
|
||
|
table: "WebApi_SupplierPart");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "IsDeleted",
|
||
|
table: "WebApi_SupplierPart");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DeleterId",
|
||
|
table: "WebApi_Receipt");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DeletionTime",
|
||
|
table: "WebApi_Receipt");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "IsDeleted",
|
||
|
table: "WebApi_Receipt");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DeleterId",
|
||
|
table: "WebApi_PO");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DeletionTime",
|
||
|
table: "WebApi_PO");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "IsDeleted",
|
||
|
table: "WebApi_PO");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DeleterId",
|
||
|
table: "WebApi_Part");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DeletionTime",
|
||
|
table: "WebApi_Part");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "IsDeleted",
|
||
|
table: "WebApi_Part");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "SequenceNumber",
|
||
|
table: "WebApi_Suppliers",
|
||
|
type: "nvarchar(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "Version",
|
||
|
table: "WebApi_Suppliers",
|
||
|
type: "nvarchar(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "SequenceNumber",
|
||
|
table: "WebApi_SupplierPart",
|
||
|
type: "nvarchar(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "Version",
|
||
|
table: "WebApi_SupplierPart",
|
||
|
type: "nvarchar(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "SequenceNumber",
|
||
|
table: "WebApi_Receipt",
|
||
|
type: "nvarchar(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "Version",
|
||
|
table: "WebApi_Receipt",
|
||
|
type: "nvarchar(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "ConcurrencyStamp",
|
||
|
table: "WebApi_PODetail",
|
||
|
type: "nvarchar(40)",
|
||
|
maxLength: 40,
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "ExtraProperties",
|
||
|
table: "WebApi_PODetail",
|
||
|
type: "nvarchar(max)",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "Version",
|
||
|
table: "WebApi_PODetail",
|
||
|
type: "nvarchar(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "SequenceNumber",
|
||
|
table: "WebApi_PO",
|
||
|
type: "nvarchar(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.CreateIndex(
|
||
|
name: "IX_WebApi_SupplierPart_SupplierCode_PartCode",
|
||
|
table: "WebApi_SupplierPart",
|
||
|
columns: new[] { "SupplierCode", "PartCode" },
|
||
|
unique: true);
|
||
|
|
||
|
migrationBuilder.CreateIndex(
|
||
|
name: "IX_WebApi_Receipt_RcNumber_PoLine_PartCode",
|
||
|
table: "WebApi_Receipt",
|
||
|
columns: new[] { "RcNumber", "PoLine", "PartCode" },
|
||
|
unique: true);
|
||
|
|
||
|
migrationBuilder.CreateIndex(
|
||
|
name: "IX_WebApi_PO_PoNumber",
|
||
|
table: "WebApi_PO",
|
||
|
column: "PoNumber",
|
||
|
unique: true,
|
||
|
filter: "[PoNumber] IS NOT NULL");
|
||
|
|
||
|
migrationBuilder.CreateIndex(
|
||
|
name: "IX_WebApi_Part_Code",
|
||
|
table: "WebApi_Part",
|
||
|
column: "Code",
|
||
|
unique: true);
|
||
|
}
|
||
|
|
||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||
|
{
|
||
|
migrationBuilder.DropIndex(
|
||
|
name: "IX_WebApi_SupplierPart_SupplierCode_PartCode",
|
||
|
table: "WebApi_SupplierPart");
|
||
|
|
||
|
migrationBuilder.DropIndex(
|
||
|
name: "IX_WebApi_Receipt_RcNumber_PoLine_PartCode",
|
||
|
table: "WebApi_Receipt");
|
||
|
|
||
|
migrationBuilder.DropIndex(
|
||
|
name: "IX_WebApi_PO_PoNumber",
|
||
|
table: "WebApi_PO");
|
||
|
|
||
|
migrationBuilder.DropIndex(
|
||
|
name: "IX_WebApi_Part_Code",
|
||
|
table: "WebApi_Part");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "SequenceNumber",
|
||
|
table: "WebApi_Suppliers");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "Version",
|
||
|
table: "WebApi_Suppliers");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "SequenceNumber",
|
||
|
table: "WebApi_SupplierPart");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "Version",
|
||
|
table: "WebApi_SupplierPart");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "SequenceNumber",
|
||
|
table: "WebApi_Receipt");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "Version",
|
||
|
table: "WebApi_Receipt");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "ConcurrencyStamp",
|
||
|
table: "WebApi_PODetail");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "ExtraProperties",
|
||
|
table: "WebApi_PODetail");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "Version",
|
||
|
table: "WebApi_PODetail");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "SequenceNumber",
|
||
|
table: "WebApi_PO");
|
||
|
|
||
|
migrationBuilder.AddColumn<Guid>(
|
||
|
name: "DeleterId",
|
||
|
table: "WebApi_Suppliers",
|
||
|
type: "uniqueidentifier",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<DateTime>(
|
||
|
name: "DeletionTime",
|
||
|
table: "WebApi_Suppliers",
|
||
|
type: "datetime2",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<bool>(
|
||
|
name: "IsDeleted",
|
||
|
table: "WebApi_Suppliers",
|
||
|
type: "bit",
|
||
|
nullable: false,
|
||
|
defaultValue: false);
|
||
|
|
||
|
migrationBuilder.AddColumn<Guid>(
|
||
|
name: "DeleterId",
|
||
|
table: "WebApi_SupplierPart",
|
||
|
type: "uniqueidentifier",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<DateTime>(
|
||
|
name: "DeletionTime",
|
||
|
table: "WebApi_SupplierPart",
|
||
|
type: "datetime2",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<bool>(
|
||
|
name: "IsDeleted",
|
||
|
table: "WebApi_SupplierPart",
|
||
|
type: "bit",
|
||
|
nullable: false,
|
||
|
defaultValue: false);
|
||
|
|
||
|
migrationBuilder.AddColumn<Guid>(
|
||
|
name: "DeleterId",
|
||
|
table: "WebApi_Receipt",
|
||
|
type: "uniqueidentifier",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<DateTime>(
|
||
|
name: "DeletionTime",
|
||
|
table: "WebApi_Receipt",
|
||
|
type: "datetime2",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<bool>(
|
||
|
name: "IsDeleted",
|
||
|
table: "WebApi_Receipt",
|
||
|
type: "bit",
|
||
|
nullable: false,
|
||
|
defaultValue: false);
|
||
|
|
||
|
migrationBuilder.AddColumn<Guid>(
|
||
|
name: "DeleterId",
|
||
|
table: "WebApi_PO",
|
||
|
type: "uniqueidentifier",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<DateTime>(
|
||
|
name: "DeletionTime",
|
||
|
table: "WebApi_PO",
|
||
|
type: "datetime2",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<bool>(
|
||
|
name: "IsDeleted",
|
||
|
table: "WebApi_PO",
|
||
|
type: "bit",
|
||
|
nullable: false,
|
||
|
defaultValue: false);
|
||
|
|
||
|
migrationBuilder.AddColumn<Guid>(
|
||
|
name: "DeleterId",
|
||
|
table: "WebApi_Part",
|
||
|
type: "uniqueidentifier",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<DateTime>(
|
||
|
name: "DeletionTime",
|
||
|
table: "WebApi_Part",
|
||
|
type: "datetime2",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<bool>(
|
||
|
name: "IsDeleted",
|
||
|
table: "WebApi_Part",
|
||
|
type: "bit",
|
||
|
nullable: false,
|
||
|
defaultValue: false);
|
||
|
|
||
|
migrationBuilder.CreateIndex(
|
||
|
name: "IX_WebApi_SupplierPart_SupplierCode_PartCode",
|
||
|
table: "WebApi_SupplierPart",
|
||
|
columns: new[] { "SupplierCode", "PartCode" },
|
||
|
unique: true,
|
||
|
filter: "IsDeleted=0");
|
||
|
|
||
|
migrationBuilder.CreateIndex(
|
||
|
name: "IX_WebApi_Receipt_RcNumber_PoLine_PartCode",
|
||
|
table: "WebApi_Receipt",
|
||
|
columns: new[] { "RcNumber", "PoLine", "PartCode" },
|
||
|
unique: true,
|
||
|
filter: "IsDeleted=0");
|
||
|
|
||
|
migrationBuilder.CreateIndex(
|
||
|
name: "IX_WebApi_PO_PoNumber",
|
||
|
table: "WebApi_PO",
|
||
|
column: "PoNumber",
|
||
|
unique: true,
|
||
|
filter: "IsDeleted=0");
|
||
|
|
||
|
migrationBuilder.CreateIndex(
|
||
|
name: "IX_WebApi_Part_Code",
|
||
|
table: "WebApi_Part",
|
||
|
column: "Code",
|
||
|
unique: true,
|
||
|
filter: "IsDeleted=0");
|
||
|
}
|
||
|
}
|
||
|
}
|