Skip to content

Commit

Permalink
fix: address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
wescopeland committed Jan 26, 2025
1 parent 27cdb09 commit 3b4901f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function select(): ?Game
->whereAllAchievementsUnlocked()
->where('achievements_total', '>', 0)
->where('game_id', '!=', $this->sourceGame->id)
->whereNull('deleted_at')
->withTrashed()
->groupBy('game_id')
->orderByRaw('COUNT(*) DESC')
->limit(10)
Expand Down Expand Up @@ -96,7 +96,7 @@ private function getMasterUserIdsMariaDB(): Collection
->where('game_id', $this->sourceGame->id)
->where('user_id', '!=', $this->user->id)
->whereAllAchievementsUnlocked()
->whereNull('deleted_at')
->withTrashed()
->whereRaw('id % 100 < 5')
->limit(5)
->pluck('user_id');
Expand All @@ -112,7 +112,7 @@ private function getMasterUserIdsSQLite(): Collection
return PlayerGame::where('game_id', $this->sourceGame->id)
->where('user_id', '!=', $this->user->id)
->whereAllAchievementsUnlocked()
->whereNull('deleted_at')
->withTrashed()
->orderByRaw('rowid % 100')
->limit(5)
->pluck('user_id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public function up(): void
'user_id',
'achievements_unlocked',
'achievements_total',
'deleted_at',
'game_id',
], 'idx_player_games_suggestions'); // custom name needed because the auto-generated one is too long
});
Expand Down

0 comments on commit 3b4901f

Please sign in to comment.