taskcafe/api/migrations/0025_add-cascade-delete-to-task-id-fk-on-task_label.up.sql
2020-06-18 18:12:15 -05:00

7 lines
200 B
SQL

ALTER TABLE task_label DROP CONSTRAINT task_label_task_id_fkey;
ALTER TABLE task_label
ADD CONSTRAINT task_label_task_id_fkey
FOREIGN KEY (task_id)
REFERENCES task(task_id)
ON DELETE CASCADE;