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.
94 lines
6.0 KiB
94 lines
6.0 KiB
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace SettleAccount.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class _20230607 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "SettleAccount_bom",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Year = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
|
|
Period = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
|
|
Factory = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
|
|
Version = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
|
|
ParentItemCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
|
|
ParentItemDesc = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: false),
|
|
ChildItemCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
|
|
ChildItemDesc = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: false),
|
|
ChildItemUom = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
|
OperateProcess = table.Column<int>(type: "int", nullable: false),
|
|
ScrapPercent = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
|
BomType = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
|
|
EffectiveTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
ExpireTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
IssuePosition = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
BomLevel = table.Column<int>(type: "int", nullable: false),
|
|
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
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),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Enabled = table.Column<bool>(type: "bit", nullable: false),
|
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_SettleAccount_bom", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "SettleAccount_bom_version",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Year = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
|
|
Period = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
|
|
Version = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
|
|
Factory = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
CustomerCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
|
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
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),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Enabled = table.Column<bool>(type: "bit", nullable: false),
|
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_SettleAccount_bom_version", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "SettleAccount_bom");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "SettleAccount_bom_version");
|
|
}
|
|
}
|
|
}
|
|
|