-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds the basic schema we've outlined in #84 (comment) Future patches might include additional columns we need, depending on how this is used. Fixes #31
- Loading branch information
Showing
4 changed files
with
271 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP TABLE IF EXISTS results; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CREATE TABLE IF NOT EXISTS results ( | ||
id uuid PRIMARY KEY, | ||
name VARCHAR(255), | ||
outcome VARCHAR(255), | ||
instruction TEXT, | ||
rationale TEXT, | ||
control_id UUID, | ||
metadata_id UUID, | ||
subject_id UUID, | ||
assessment_id UUID, | ||
CONSTRAINT fk_results_control_id FOREIGN KEY (control_id) REFERENCES controls (id), | ||
CONSTRAINT fk_results_metadata_id FOREIGN KEY (metadata_id) REFERENCES metadata (id), | ||
CONSTRAINT fk_results_subject_id FOREIGN KEY (subject_id) REFERENCES subjects (id), | ||
CONSTRAINT fk_results_assessment_id FOREIGN KEY (assessment_id) REFERENCES assessments (id) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters