20240623005113_BanTemplate.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 BanTemplate : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.CreateTable(
  13. name: "ban_template",
  14. columns: table => new
  15. {
  16. ban_template_id = table.Column<int>(type: "INTEGER", nullable: false)
  17. .Annotation("Sqlite:Autoincrement", true),
  18. title = table.Column<string>(type: "TEXT", nullable: false),
  19. length = table.Column<TimeSpan>(type: "TEXT", nullable: false),
  20. reason = table.Column<string>(type: "TEXT", nullable: false),
  21. exempt_flags = table.Column<int>(type: "INTEGER", nullable: false),
  22. severity = table.Column<int>(type: "INTEGER", nullable: false),
  23. auto_delete = table.Column<bool>(type: "INTEGER", nullable: false),
  24. hidden = table.Column<bool>(type: "INTEGER", nullable: false)
  25. },
  26. constraints: table =>
  27. {
  28. table.PrimaryKey("PK_ban_template", x => x.ban_template_id);
  29. });
  30. }
  31. /// <inheritdoc />
  32. protected override void Down(MigrationBuilder migrationBuilder)
  33. {
  34. migrationBuilder.DropTable(
  35. name: "ban_template");
  36. }
  37. }
  38. }