taskcafe/migrations/0026_add-cascade-delete-to-task-id-fk-on-task_assigned.up.sql

7 lines
212 B
MySQL
Raw Permalink Normal View History

2020-06-19 01:12:15 +02:00
ALTER TABLE task_assigned DROP CONSTRAINT task_assigned_task_id_fkey;
ALTER TABLE task_assigned
ADD CONSTRAINT task_assigned_task_id_fkey
FOREIGN KEY (task_id)
REFERENCES task(task_id)
ON DELETE CASCADE;