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

7 lines
206 B
SQL

ALTER TABLE task DROP CONSTRAINT task_task_group_id_fkey;
ALTER TABLE task
ADD CONSTRAINT task_task_group_id_fkey
FOREIGN KEY (task_group_id)
REFERENCES task_group(task_group_id)
ON DELETE CASCADE;