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.
91 lines
3.7 KiB
91 lines
3.7 KiB
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace Win_in.Sfs.Basedata.Migrations
|
|
{
|
|
public partial class delchanpinlei : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Basedata_ProductLine");
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "LocSwitch_EnableSplitBox",
|
|
table: "Basedata_LocationGroup",
|
|
type: "bit",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "LocSwitch_EnableSplitPallet",
|
|
table: "Basedata_LocationGroup",
|
|
type: "bit",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "PramaryUM",
|
|
table: "Basedata_ItemStoreRelation",
|
|
type: "int",
|
|
maxLength: 64,
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(64)",
|
|
oldMaxLength: 64,
|
|
oldNullable: true);
|
|
|
|
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LocSwitch_EnableSplitBox",
|
|
table: "Basedata_LocationGroup");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LocSwitch_EnableSplitPallet",
|
|
table: "Basedata_LocationGroup");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "PramaryUM",
|
|
table: "Basedata_ItemStoreRelation",
|
|
type: "nvarchar(64)",
|
|
maxLength: 64,
|
|
nullable: true,
|
|
oldClrType: typeof(int),
|
|
oldType: "int",
|
|
oldMaxLength: 64);
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "Basedata_ProductLine",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Code = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
|
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
Description = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
|
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
|
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
|
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Basedata_ProductLine", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Basedata_ProductLine_Code_Company",
|
|
table: "Basedata_ProductLine",
|
|
columns: new[] { "Code", "Company" },
|
|
unique: true);
|
|
}
|
|
}
|
|
}
|
|
|