-- Run this if you get "Duplicate entry for game_uid" errors
-- Allows same game_uid (game code) for different users

ALTER TABLE game_sessions DROP INDEX uk_game_uid;
ALTER TABLE game_sessions ADD UNIQUE KEY uk_client_user_game (client_id, user_id, game_uid);
ALTER TABLE game_sessions ADD INDEX idx_game_uid (game_uid);
