taskcafe/migrations/0033_add-cascade-delete-to_task_label_project_label_id_fkey.up.sql

7 lines
245 B
MySQL
Raw Normal View History

ALTER TABLE task_label DROP CONSTRAINT task_label_project_label_id_fkey;
ALTER TABLE task_label
ADD CONSTRAINT task_label_project_label_id_fkey
FOREIGN KEY (project_label_id)
REFERENCES project_label(project_label_id)
ON DELETE CASCADE;