Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
531f30f0eb
commit
cf7961e8fb
@@ -0,0 +1,7 @@
|
||||
ALTER TABLE public.events
|
||||
ADD COLUMN IF NOT EXISTS assigned_to uuid REFERENCES public.profiles(id) ON DELETE SET NULL;
|
||||
|
||||
-- Backfill existing rows: assignee = creator
|
||||
UPDATE public.events SET assigned_to = created_by WHERE assigned_to IS NULL AND created_by IS NOT NULL;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS events_assigned_to_idx ON public.events(assigned_to);
|
||||
Reference in New Issue
Block a user