using System; using Microsoft.EntityFrameworkCore.Migrations; namespace Win_in.Sfs.Label.Migrations { public partial class CountLabel : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "LabelCountLabel", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), RuleCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), PalletlNumber = table.Column(type: "int", maxLength: 4096, 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), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Company = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) }, constraints: table => { table.PrimaryKey("PK_LabelCountLabel", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_LabelCountLabel_Company_RuleCode_PalletlNumber", table: "LabelCountLabel", columns: new[] { "Company", "RuleCode", "PalletlNumber" }, unique: true); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "LabelCountLabel"); } } }