Skip to content

Commit

Permalink
fix: Add on delete cascade to system_metrics (#10113)
Browse files Browse the repository at this point in the history
  • Loading branch information
gt2345 authored Oct 24, 2024
1 parent 3c59233 commit e834302
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
system_metrics needs delete cascade added to its foreign key constraint to runs(id) since
runs(experiment_id) has delete cascade constraint to experiments(id).
*/

ALTER TABLE system_metrics
DROP CONSTRAINT system_metrics_trial_id_fkey;

ALTER TABLE system_metrics
ADD CONSTRAINT system_metrics_trial_id_fkey FOREIGN KEY (trial_id) REFERENCES runs(id)
ON DELETE CASCADE;

0 comments on commit e834302

Please sign in to comment.