1
0

20201109092917_ExtraIndices.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. namespace Content.Server.Database.Migrations.Sqlite
  3. {
  4. public partial class ExtraIndices : Migration
  5. {
  6. protected override void Up(MigrationBuilder migrationBuilder)
  7. {
  8. migrationBuilder.CreateIndex(
  9. name: "IX_player_last_seen_user_name",
  10. table: "player",
  11. column: "last_seen_user_name");
  12. migrationBuilder.CreateIndex(
  13. name: "IX_admin_rank_flag_flag_admin_rank_id",
  14. table: "admin_rank_flag",
  15. columns: new[] { "flag", "admin_rank_id" },
  16. unique: true);
  17. migrationBuilder.CreateIndex(
  18. name: "IX_admin_flag_flag_admin_id",
  19. table: "admin_flag",
  20. columns: new[] { "flag", "admin_id" },
  21. unique: true);
  22. }
  23. protected override void Down(MigrationBuilder migrationBuilder)
  24. {
  25. migrationBuilder.DropIndex(
  26. name: "IX_player_last_seen_user_name",
  27. table: "player");
  28. migrationBuilder.DropIndex(
  29. name: "IX_admin_rank_flag_flag_admin_rank_id",
  30. table: "admin_rank_flag");
  31. migrationBuilder.DropIndex(
  32. name: "IX_admin_flag_flag_admin_id",
  33. table: "admin_flag");
  34. }
  35. }
  36. }