taskcafe/api/migrations/0032_add-cascade-delete-to-project_label.up.sql
2020-06-20 17:49:11 -05:00

7 lines
227 B
SQL

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;