Created
October 21, 2019 10:42
-
-
Save trimoq/f4306e35d00a5e3542231c02ebbd1f42 to your computer and use it in GitHub Desktop.
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
CREATE TABLE drive ( | |
id SERIAL PRIMARY KEY, | |
user_id INTEGER NOT NULL REFERENCES apiuser(id) ON DELETE CASCADE, | |
travel_date DATE NOT NULL, | |
start_loc VARCHAR NOT NULL, | |
end_loc VARCHAR NOT NULL, | |
distance INTEGER NOT NULL, | |
UNIQUE(user_id,travel_date) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment