Open HackerMasterEango opened 4 days ago
Attempting a schema which contains 6 tables: games, units, categories, tier_lists, tier_list_entries, and votes. All tables have a uuid column.
ALTER TABLE tier_list.tier_list_entries
ADD CONSTRAINT unique_tier_list_and_unit UNIQUE (tier_lists_id, units_id, categories_id);
ALTER TABLE tier_list.votes
ADD CONSTRAINT unique_tier_list_user_vote UNIQUE (tier_lists_id, user_id);
FEATURE - logged in users can make a tier list, and vote on placements.
will need a database table and server action to save user. In longrun we will have weighted scoring algorithms but for this initial work just.
each game is different so the db schema is complicated here, can maybe get supabase ai chat to help map it but basically would need
WIP - define schema here.