fix: add cascade delete to task comment & activity rows

This commit is contained in:
Jordan Knott 2020-12-25 22:16:16 -06:00
parent 66c603de75
commit 9c051c51a6

View File

@ -0,0 +1,13 @@
ALTER TABLE task_activity DROP CONSTRAINT task_activity_task_id_fkey;
ALTER TABLE task_activity
ADD CONSTRAINT task_activity_task_id_fkey
FOREIGN KEY (task_id)
REFERENCES task(task_id)
ON DELETE CASCADE;
ALTER TABLE task_comment DROP CONSTRAINT task_comment_task_id_fkey;
ALTER TABLE task_comment
ADD CONSTRAINT task_comment_task_id_fkey
FOREIGN KEY (task_id)
REFERENCES task(task_id)
ON DELETE CASCADE;