Skip to content

Commit

Permalink
Fix schema constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
jlubken committed Nov 3, 2022
1 parent a9a3bf9 commit 0cbec30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postgres/sql/patchdb.d/005.public.sql
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ begin
-- document your assumptions about how many predictions are made per subject
-- per visit?
-- per run?
constraint only_one_prediction_per_subject_and_run
unique (run_id, subject_id),
constraint only_one_prediction_per_subject_kind_and_run
unique (run_id, subject_id, kind),
-- pick one of the following two constaints
constraint prediction_score_must_be_a_normal
check (0.0 <= score and score <= 1.0),
Expand Down

0 comments on commit 0cbec30

Please sign in to comment.