taskcafe/migrations/0048_add-cascade-delete-to-task_group_project_id_fkey.up.sql

7 lines
215 B
MySQL
Raw Normal View History

ALTER TABLE task_group DROP CONSTRAINT task_group_project_id_fkey;
ALTER TABLE task_group
ADD CONSTRAINT task_group_project_id_fkey
FOREIGN KEY (project_id)
REFERENCES project(project_id)
ON DELETE CASCADE;