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.
 
 
 
 
 
 

123 lines
4.8 KiB

using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win_in.Sfs.Basedata.Migrations
{
public partial class _202249 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Basedata_LocationItem");
migrationBuilder.AddColumn<string>(
name: "AltUm",
table: "Basedata_ItemStoreRelation",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "AltUmQty",
table: "Basedata_ItemStoreRelation",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<bool>(
name: "IsFixed",
table: "Basedata_ItemStoreRelation",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<int>(
name: "MultiLoc",
table: "Basedata_ItemStoreRelation",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "PramaryUM",
table: "Basedata_ItemStoreRelation",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "StoreUM",
table: "Basedata_ItemStoreRelation",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "UmQty",
table: "Basedata_ItemStoreRelation",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AltUm",
table: "Basedata_ItemStoreRelation");
migrationBuilder.DropColumn(
name: "AltUmQty",
table: "Basedata_ItemStoreRelation");
migrationBuilder.DropColumn(
name: "IsFixed",
table: "Basedata_ItemStoreRelation");
migrationBuilder.DropColumn(
name: "MultiLoc",
table: "Basedata_ItemStoreRelation");
migrationBuilder.DropColumn(
name: "PramaryUM",
table: "Basedata_ItemStoreRelation");
migrationBuilder.DropColumn(
name: "StoreUM",
table: "Basedata_ItemStoreRelation");
migrationBuilder.DropColumn(
name: "UmQty",
table: "Basedata_ItemStoreRelation");
migrationBuilder.CreateTable(
name: "Basedata_LocationItem",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", 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),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Basedata_LocationItem", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_Basedata_LocationItem_ItemCode_LocationCode_WarehouseCode_Company",
table: "Basedata_LocationItem",
columns: new[] { "ItemCode", "LocationCode", "WarehouseCode", "Company" },
unique: true);
}
}
}