Files
Convivo/supabase/migrations/20260909040000_pretix_api_key.sql
f74db9dc26 pretix: per-event API key + live organizer/event picker
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-09-09 18:03:18 +02:00

18 lines
1.0 KiB
SQL

-- =============================================================================
-- Convivo — per-event Pretix API key
--
-- Moves the Pretix API key from a sidecar env var to a per-event column so an
-- admin can paste it in the event settings. The sidecar's /pretix-options
-- endpoint uses it to list the key's organizers + events (so the admin picks
-- the organizer + event slug from real data), and the every-minute sync uses
-- it to authenticate. The key is stored in plain text and remains visible in
-- the event settings (admin-only column, readable/writable by admin via RLS).
-- =============================================================================
alter table public.events add column if not exists pretix_api_key text;
comment on column public.events.pretix_api_key is
'Pretix API token for this event. Used by the sidecar to list the key''s '
'organizers/events (POST /pretix-options) and to authenticate the '
'every-minute paid-ticket sync. Stored in plain text; visible in the event '
'settings.';