20221115044729_202211151242.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace Safeguard.Migrations
  5. {
  6. /// <inheritdoc />
  7. public partial class _202211151242 : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.CreateTable(
  13. name: "HostMqttInfos",
  14. columns: table => new
  15. {
  16. Id = table.Column<Guid>(type: "TEXT", nullable: false),
  17. IPAddress = table.Column<string>(type: "TEXT", nullable: true),
  18. Port = table.Column<int>(type: "INTEGER", nullable: true)
  19. },
  20. constraints: table =>
  21. {
  22. table.PrimaryKey("PK_HostMqttInfos", x => x.Id);
  23. });
  24. migrationBuilder.CreateTable(
  25. name: "MCConfigs",
  26. columns: table => new
  27. {
  28. Id = table.Column<Guid>(type: "TEXT", nullable: false),
  29. Name = table.Column<string>(type: "TEXT", nullable: true),
  30. JsonString = table.Column<string>(type: "TEXT", nullable: true)
  31. },
  32. constraints: table =>
  33. {
  34. table.PrimaryKey("PK_MCConfigs", x => x.Id);
  35. });
  36. }
  37. /// <inheritdoc />
  38. protected override void Down(MigrationBuilder migrationBuilder)
  39. {
  40. migrationBuilder.DropTable(
  41. name: "HostMqttInfos");
  42. migrationBuilder.DropTable(
  43. name: "MCConfigs");
  44. }
  45. }
  46. }