-- RAIET v1.32.1 SIMPLE AUTO FIND
-- v1.32 briefly created automatic 'quick' lobbies. The simplified model no longer
-- creates them. Close only still-open quick lobbies so they cannot confuse search.

UPDATE lobbies
SET status = 'closed', ready_check_started_at = NULL, updated_at = NOW()
WHERE lobby_type = 'quick' AND status = 'open';

UPDATE lobby_members lm
INNER JOIN lobbies l ON l.id = lm.lobby_id
SET lm.ready_at = NULL
WHERE l.lobby_type = 'quick' AND l.status = 'closed';
