taskcafe/migrations/0027_add-cascade-delete-to-task_group_id-fk-on-task.up.sql

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;