-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into jauggy/add-rankicons
- Loading branch information
Showing
11 changed files
with
51 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
priv/repo/migrations/20240513165706_add_fk_battle_matches_lobby_messages.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
defmodule Teiserver.Repo.Migrations.AddFkBattleMatchesLobbyMessages do | ||
use Ecto.Migration | ||
# This change is being done to reduce the CPU load of the hourly Teiserver.Battle.Tasks.CleanupTask | ||
# As deleting rows from tables with non-indexed foreign keys is probably expensive | ||
# This migration adds indexes on the columns used as foreign key on the battle_matches table | ||
|
||
def change do | ||
create index(:teiserver_battle_match_memberships, [:match_id]) | ||
create index(:teiserver_lobby_messages, [:match_id]) | ||
create index(:moderation_reports, [:match_id]) | ||
create index(:telemetry_simple_match_events, [:match_id]) | ||
create index(:telemetry_complex_match_events, [:match_id]) | ||
create index(:telemetry_simple_lobby_events, [:match_id]) | ||
create index(:telemetry_complex_lobby_events, [:match_id]) | ||
create index(:moderation_report_groups, [:match_id]) | ||
end | ||
end |