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

7 lines
206 B
MySQL
Raw Normal View History

2020-06-19 01:12:15 +02:00
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;