taskcafe/migrations/0032_add-cascade-delete-to-project_label.up.sql

7 lines
227 B
MySQL
Raw Normal View History

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