-- ============================================================================= -- Convivo — remove the Pretix/Sessionize "Interfaces" feature -- -- The Interfaces feature (Phases 7 + 8) is being removed: the APPE Admin -- "Interfaces" view, the `sync-trigger` Edge Function, the local mock API, and -- the supporting DB objects. This migration drops the DB side: -- -- * `sync_pretix_attendees(jsonb)` — service-role sync RPC (Pretix tickets) -- * `sync_sessionize_sessions(jsonb)` — service-role sync RPC (Sessionize agenda) -- * `_ensure_auth_user(text,text,text)` — helper used only by the sync RPCs -- * `_map_ticket_type(text)` — helper used only by the sync RPCs -- * `sync_runs` table (+ index, RLS policies) — sync audit trail -- -- The `external_id` columns added by the interfaces migration are left in place -- (they are harmless, nullable, and part of the base table definitions). -- ============================================================================= -- Drop the sync RPCs first (they reference the helpers + sync_runs). drop function if exists public.sync_pretix_attendees(jsonb); drop function if exists public.sync_sessionize_sessions(jsonb); -- Drop the sync-only helper functions. drop function if exists public._ensure_auth_user(text, text, text); drop function if exists public._map_ticket_type(text); -- Drop the audit table (cascades to its index + RLS policies). drop table if exists public.sync_runs;