Files
Convivo/supabase/migrations/20260830000000_remove_interfaces.sql
24909cf8ab Existing-sponsor link + remove Interfaces (Pretix/Sessionize)
- Sponsor lookup popup can now link an existing sponsor (dropdown + pre-fill)
  or create a new one; save upserts the sponsor linked to the contact and sets
  the registration type to sponsor.
- Remove the Interfaces feature end-to-end: admin nav button + Sync view, sync
  API helpers + SyncRun type, sync-trigger Edge Function, mock-api + its
  docker-compose service, and a migration dropping the sync RPCs, helpers, and
  sync_runs table.
- Update docs (architecture, backend, frontend, README, roadmap, next-steps).

Co-authored-by: Stephan Charles <[email protected]>
Co-authored-by: Amelia Hernandez <[email protected]>
Co-authored-by: Markus Franz <[email protected]>
Co-authored-by: Sabrina Hota <[email protected]>
Co-authored-by: Nilüfer Doğan <[email protected]>
2026-08-24 09:11:25 +02:00

28 lines
1.4 KiB
SQL

-- =============================================================================
-- 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;