leaderboardsgg / leaderboard-backend

The backend for Leaderboards.gg. Also holds public-facing APIs.
https://info.leaderboards.gg
GNU General Public License v3.0
12 stars 16 forks source link

Bug: Cat Slugs Are Globally Unique #222

Open TheTedder opened 1 month ago

TheTedder commented 1 month ago

Cat slugs are globally unique instead of unique to LBs.

Step(s) to Reproduce

Create a category with a slug that has been used for a different game but not the current game.

Expected Result

The category is created successfully.

Actual Outcome

The category fails to be created because its slug is "already used" by a different leaderboard.

How to Fix This

Change the uniqueness constraint so that it includes the leaderboard_id field too.