Files
acmcc/supabase/migrations/20260417214839_78aa5721-7eca-4295-8ac0-9362a0c7770f.sql
T
2026-06-01 20:19:26 -04:00

27 lines
945 B
SQL

ALTER TABLE public.profiles
ADD COLUMN IF NOT EXISTS bio TEXT,
ADD COLUMN IF NOT EXISTS mailing_street TEXT,
ADD COLUMN IF NOT EXISTS mailing_city TEXT,
ADD COLUMN IF NOT EXISTS mailing_state TEXT,
ADD COLUMN IF NOT EXISTS mailing_zip TEXT,
ADD COLUMN IF NOT EXISTS emergency_contact_name TEXT,
ADD COLUMN IF NOT EXISTS emergency_contact_phone TEXT,
ADD COLUMN IF NOT EXISTS preferred_notification_email TEXT,
ADD COLUMN IF NOT EXISTS preferred_language TEXT DEFAULT 'en',
ADD COLUMN IF NOT EXISTS notification_preferences JSONB NOT NULL DEFAULT jsonb_build_object(
'messages_comments', true,
'financial', true,
'governance', true,
'compliance', true
);
UPDATE public.profiles
SET notification_preferences = jsonb_build_object(
'messages_comments', true,
'financial', true,
'governance', true,
'compliance', true
)
WHERE notification_preferences IS NULL OR notification_preferences = '{}'::jsonb;