|
|
@@ -0,0 +1,81 @@
|
|
|
+using System;
|
|
|
+using Microsoft.EntityFrameworkCore.Metadata;
|
|
|
+using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
+
|
|
|
+#nullable disable
|
|
|
+
|
|
|
+namespace Business.Migrations.BusinessExtMigrationDb
|
|
|
+{
|
|
|
+ public partial class init : Migration
|
|
|
+ {
|
|
|
+ protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
+ {
|
|
|
+ migrationBuilder.AlterDatabase()
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
+
|
|
|
+ migrationBuilder.CreateTable(
|
|
|
+ name: "ic_bom",
|
|
|
+ columns: table => new
|
|
|
+ {
|
|
|
+ Id = table.Column<long>(type: "bigint", nullable: false)
|
|
|
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
+ bom_number = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "bom单编号")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
|
|
|
+ item_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料代码")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ item_name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "物料名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ bom_num = table.Column<int>(type: "int", nullable: false, comment: "序号"),
|
|
|
+ fse_status = table.Column<int>(type: "int", nullable: false, comment: "使用状态"),
|
|
|
+ begin_day = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "生效日期"),
|
|
|
+ end_day = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "失效日期"),
|
|
|
+ tech_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺主键"),
|
|
|
+ tech_name = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "工艺名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ product_principal = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "生产负责人")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ product_designer = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "产品设计员")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ version = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "版本")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ chartnumber = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "图表编号")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ biller = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "图片")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ checker = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "检验人")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ check_date = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "检验时间"),
|
|
|
+ user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "bom创建人")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ use_date = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "bom创建时间"),
|
|
|
+ unit = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "单位")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
+ create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ create_time = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "创建时间"),
|
|
|
+ update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
|
|
|
+ update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ update_time = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "修改时间"),
|
|
|
+ tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
|
|
|
+ factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
|
|
|
+ org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
|
|
|
+ IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
|
|
|
+ },
|
|
|
+ constraints: table =>
|
|
|
+ {
|
|
|
+ table.PrimaryKey("PK_ic_bom", x => x.Id);
|
|
|
+ },
|
|
|
+ comment: "物料BOM")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
+ }
|
|
|
+
|
|
|
+ protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
+ {
|
|
|
+ migrationBuilder.DropTable(
|
|
|
+ name: "ic_bom");
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|