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