-- Entfernt das synthetische Volumen aus catalog_search_perf_load.sql (alle Zeilen mit ID-Praefix 9e4f0000-). -- Alternative Titel, Verlags-, Genre- und Mechanik-Zuordnungen verschwinden per on delete cascade mit den Spielen. -- Aufruf (gleiche Schutzstufen wie das Ladeskript): -- docker exec -i supabase_db_shuffle psql -U postgres -d postgres -X -v confirm_local=yes \ -- < supabase/perf/catalog_search_perf_unload.sql \set ON_ERROR_STOP on \if :{?confirm_local} \else \set confirm_local no \endif select :'confirm_local' = 'yes' as confirm_ok, coalesce(:'HOST', '') like '/%' as socket_ok \gset \if :confirm_ok \else \echo 'Abbruch: mit -v confirm_local=yes aufrufen.' \quit \endif \if :socket_ok \else \echo 'Abbruch: nur per Unix-Socket im lokalen Container.' \quit \endif begin; delete from public.games where id::text like '9e4f0000-%'; delete from public.publishers where id::text like '9e4f0000-%'; commit; vacuum (analyze) public.games; vacuum (analyze) public.game_alt_titles; vacuum (analyze) public.publishers; vacuum (analyze) public.game_publishers; vacuum (analyze) public.game_genres; vacuum (analyze) public.game_mechanics; \echo === entfernt === select (select count(*) from public.games where id::text like '9e4f0000-%') as spiele_uebrig, (select count(*) from public.publishers where id::text like '9e4f0000-%') as verlage_uebrig, (select count(*) from public.catalog_games) as katalogspiele;