Skip to content

Commit a0876b9

Browse files
gt2345thiagodallacqua-hpe
authored andcommitted
fix: Add on delete cascade to system_metrics (#10113)
1 parent 1009ae7 commit a0876b9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
system_metrics needs delete cascade added to its foreign key constraint to runs(id) since
3+
runs(experiment_id) has delete cascade constraint to experiments(id).
4+
*/
5+
6+
ALTER TABLE system_metrics
7+
DROP CONSTRAINT system_metrics_trial_id_fkey;
8+
9+
ALTER TABLE system_metrics
10+
ADD CONSTRAINT system_metrics_trial_id_fkey FOREIGN KEY (trial_id) REFERENCES runs(id)
11+
ON DELETE CASCADE;

0 commit comments

Comments
 (0)