Skip to content

Commit

Permalink
fixed foreign key on exit survey
Browse files Browse the repository at this point in the history
  • Loading branch information
srukelman committed Dec 6, 2024
1 parent 97dd875 commit 6bf5f1f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/db/schema/exit_survey.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
DROP TABLE IF EXISTS exit_survey CASCADE;

CREATE TYPE rating AS ENUM ('Excellent', 'Good', 'Fair', 'Unsatisfactory');
CREATE TYPE rating_help as ENUM('very helpful', 'helpful', 'not very helpful', 'not helpful at all');

CREATE TABLE exit_survey (
id INT PRIMARY KEY,
cm_id INT NOT NULL,
name VARCHAR(32) NOT NULL,
client_id INT NOT NULL,
site INT NOT NULL,
program_date_completion DATE NOT NULL,
cch_rating rating NOT NULL,
Expand All @@ -19,6 +21,7 @@ CREATE TABLE exit_survey (
experience_accomplished VARCHAR(2048) NOT NULL,
experience_extra_notes VARCHAR(2048) NOT NULL,

FOREIGN KEY(cm_id) REFERENCES case_manager(id),
FOREIGN KEY(cm_id) REFERENCES case_managers(id),
FOREIGN KEY(client_id) REFERENCES clients(id),
FOREIGN KEY(site) REFERENCES locations(id)
);

0 comments on commit 6bf5f1f

Please sign in to comment.