Migration to add leave_of_absence(id) and pass_slips(id) on notifications table

This commit is contained in:
Marc Rejohn Castillano 2026-03-15 22:37:42 +08:00
parent 885b543fb5
commit 9f7791e56f

View File

@ -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;