20221010025311_新增状态记录.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace WCS.Service.Migrations
  5. {
  6. public partial class 新增状态记录 : Migration
  7. {
  8. protected override void Up(MigrationBuilder migrationBuilder)
  9. {
  10. migrationBuilder.CreateTable(
  11. name: "WCS_DEVICESTATELOG",
  12. columns: table => new
  13. {
  14. ID = table.Column<int>(type: "int", nullable: false)
  15. .Annotation("SqlServer:Identity", "1, 1"),
  16. DEVICECODE = table.Column<string>(type: "nvarchar(max)", nullable: true),
  17. STATE = table.Column<string>(type: "nvarchar(max)", nullable: true),
  18. ENABLED = table.Column<bool>(type: "bit", nullable: false),
  19. UPDATEUSER = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
  20. UPDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
  21. VER = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true)
  22. },
  23. constraints: table =>
  24. {
  25. table.PrimaryKey("PK_WCS_DEVICESTATELOG", x => x.ID);
  26. });
  27. }
  28. protected override void Down(MigrationBuilder migrationBuilder)
  29. {
  30. migrationBuilder.DropTable(
  31. name: "WCS_DEVICESTATELOG");
  32. }
  33. }
  34. }