From 9f7791e56f15c262dd559bdf81140436363c6dcd Mon Sep 17 00:00:00 2001 From: Marc Rejohn Castillano Date: Sun, 15 Mar 2026 22:37:42 +0800 Subject: [PATCH] Migration to add leave_of_absence(id) and pass_slips(id) on notifications table --- ...0260312000000_add_leave_pass_slip_to_notifications.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 supabase/migrations/20260312000000_add_leave_pass_slip_to_notifications.sql diff --git a/supabase/migrations/20260312000000_add_leave_pass_slip_to_notifications.sql b/supabase/migrations/20260312000000_add_leave_pass_slip_to_notifications.sql new file mode 100644 index 00000000..16ed98fc --- /dev/null +++ b/supabase/migrations/20260312000000_add_leave_pass_slip_to_notifications.sql @@ -0,0 +1,8 @@ +-- Add reference columns so notifications can link to leave requests and pass slips. +-- These allow the app to store leave_id/pass_slip_id in notifications (and send to clients). + +ALTER TABLE notifications + ADD COLUMN IF NOT EXISTS leave_id uuid REFERENCES leave_of_absence(id) ON DELETE CASCADE; + +ALTER TABLE notifications + ADD COLUMN IF NOT EXISTS pass_slip_id uuid REFERENCES pass_slips(id) ON DELETE CASCADE;