Skip to content

Commit

Permalink
SQL scheme: CHECK activities_and_emotions.proportion BETWEEN 1 AND 100
Browse files Browse the repository at this point in the history
  • Loading branch information
kolayne committed Jan 31, 2021
1 parent 6e08e1f commit dbcf6bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database_scheme.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ $$ LANGUAGE sql;
CREATE TABLE "activities_and_emotions" (
"type_id" integer REFERENCES types_of_activities_and_emotions NOT NULL,
"day_id" integer REFERENCES days NOT NULL,
"proportion" integer NOT NULL,
"proportion" integer NOT NULL CHECK ( proportion BETWEEN 1 AND 100 /* inclusive */ ),
CHECK (does_activity_or_emotion_belong_to_user_of_the_day(type_id,day_id))
);

0 comments on commit dbcf6bd

Please sign in to comment.