20210423093141_1.cs 1.6 KB

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