You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: migrations/Version20260102230000.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -17,23 +17,23 @@ public function getDescription(): string
17
17
publicfunctionup(Schema$schema): void
18
18
{
19
19
// Composite index for player statistics and ranking queries
20
-
$this->addSql('CREATE INDEX idx_pst_player_puzzle_type ON puzzle_solving_time (player_id, puzzle_id, puzzling_type)');
20
+
$this->addSql('CREATE INDEX custom_pst_player_puzzle_type ON puzzle_solving_time (player_id, puzzle_id, puzzling_type)');
21
21
22
22
// Index for date-based monthly queries (used after EXTRACT->date range optimization)
23
-
$this->addSql('CREATE INDEX idx_pst_tracked_at_type ON puzzle_solving_time (tracked_at, puzzling_type)');
23
+
$this->addSql('CREATE INDEX custom_pst_tracked_at_type ON puzzle_solving_time (tracked_at, puzzling_type)');
24
24
25
25
// Partial index for fastest players/groups/pairs queries
26
-
$this->addSql('CREATE INDEX idx_pst_type_time_valid ON puzzle_solving_time (puzzling_type, seconds_to_solve) WHERE seconds_to_solve IS NOT NULL AND suspicious = false');
26
+
$this->addSql('CREATE INDEX custom_pst_type_time_valid ON puzzle_solving_time (puzzling_type, seconds_to_solve) WHERE seconds_to_solve IS NOT NULL AND suspicious = false');
27
27
28
28
// GIN index for JSONB containment on team column (custom_ prefix = Doctrine won't manage it)
29
29
$this->addSql('CREATE INDEX custom_pst_team_puzzlers_gin ON puzzle_solving_time USING GIN ((team::jsonb->\'puzzlers\') jsonb_path_ops) WHERE team IS NOT NULL');
30
30
}
31
31
32
32
publicfunctiondown(Schema$schema): void
33
33
{
34
-
$this->addSql('DROP INDEX IF EXISTS idx_pst_player_puzzle_type');
35
-
$this->addSql('DROP INDEX IF EXISTS idx_pst_tracked_at_type');
36
-
$this->addSql('DROP INDEX IF EXISTS idx_pst_type_time_valid');
34
+
$this->addSql('DROP INDEX IF EXISTS custom_pst_player_puzzle_type');
35
+
$this->addSql('DROP INDEX IF EXISTS custom_pst_tracked_at_type');
36
+
$this->addSql('DROP INDEX IF EXISTS custom_pst_type_time_valid');
37
37
$this->addSql('DROP INDEX IF EXISTS custom_pst_team_puzzlers_gin');
$pdo->exec('CREATE INDEX IF NOT EXISTS idx_pst_player_puzzle_type ON puzzle_solving_time (player_id, puzzle_id, puzzling_type)');
171
-
$pdo->exec('CREATE INDEX IF NOT EXISTS idx_pst_tracked_at_type ON puzzle_solving_time (tracked_at, puzzling_type)');
172
-
$pdo->exec('CREATE INDEX IF NOT EXISTS idx_pst_type_time_valid ON puzzle_solving_time (puzzling_type, seconds_to_solve) WHERE seconds_to_solve IS NOT NULL AND suspicious = false');
170
+
$pdo->exec('CREATE INDEX IF NOT EXISTS custom_pst_player_puzzle_type ON puzzle_solving_time (player_id, puzzle_id, puzzling_type)');
171
+
$pdo->exec('CREATE INDEX IF NOT EXISTS custom_pst_tracked_at_type ON puzzle_solving_time (tracked_at, puzzling_type)');
172
+
$pdo->exec('CREATE INDEX IF NOT EXISTS custom_pst_type_time_valid ON puzzle_solving_time (puzzling_type, seconds_to_solve) WHERE seconds_to_solve IS NOT NULL AND suspicious = false');
173
173
$pdo->exec("CREATE INDEX IF NOT EXISTS custom_pst_team_puzzlers_gin ON puzzle_solving_time USING GIN ((team::jsonb->'puzzlers') jsonb_path_ops) WHERE team IS NOT NULL");
0 commit comments