taskcafe/api/migrations/0035_add-cascade-delete-to-task_assigned_user_id_fkey.up.sql
2020-06-23 15:20:53 -05:00

7 lines
220 B
SQL

ALTER TABLE task_assigned DROP CONSTRAINT task_assigned_user_id_fkey;
ALTER TABLE task_assigned
ADD CONSTRAINT task_assigned_user_id_fkey
FOREIGN KEY (user_id)
REFERENCES user_account(user_id)
ON DELETE CASCADE;