20241122174236_IPIntel.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace Content.Server.Database.Migrations.Sqlite
  5. {
  6. /// <inheritdoc />
  7. public partial class IPIntel : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.CreateTable(
  13. name: "ipintel_cache",
  14. columns: table => new
  15. {
  16. ipintel_cache_id = table.Column<int>(type: "INTEGER", nullable: false)
  17. .Annotation("Sqlite:Autoincrement", true),
  18. address = table.Column<string>(type: "TEXT", nullable: false),
  19. time = table.Column<DateTime>(type: "TEXT", nullable: false),
  20. score = table.Column<float>(type: "REAL", nullable: false)
  21. },
  22. constraints: table =>
  23. {
  24. table.PrimaryKey("PK_ipintel_cache", x => x.ipintel_cache_id);
  25. });
  26. migrationBuilder.CreateIndex(
  27. name: "IX_ipintel_cache_address",
  28. table: "ipintel_cache",
  29. column: "address",
  30. unique: true);
  31. }
  32. /// <inheritdoc />
  33. protected override void Down(MigrationBuilder migrationBuilder)
  34. {
  35. migrationBuilder.DropTable(
  36. name: "ipintel_cache");
  37. }
  38. }
  39. }