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;