@@ -10,7 +10,7 @@ CREATE TABLE Users (
10
10
DROP TABLE IF EXISTS Questions;
11
11
CREATE TABLE Questions (
12
12
qid SERIAL PRIMARY KEY ,
13
- cid FOREIGN KEY references Competitions(cid),
13
+ FOREIGN (cid) KEY references Competitions(cid),
14
14
numParts INTEGER NOT NULL ,
15
15
name TEXT NOT NULL ,
16
16
pixelArtLine TEXT NOT NULL ,
@@ -19,7 +19,7 @@ CREATE TABLE Questions (
19
19
20
20
DROP TABLE IF EXISTS Parts;
21
21
CREATE TABLE Parts (
22
- qid FOREIGN KEY references Questions(qid),
22
+ FOREIGN KEY (qid) references Questions(qid),
23
23
description TEXT NOT NULL ,
24
24
partNum INTEGER NOT NULL ,
25
25
numSolved INTEGER NOT NULL ,
@@ -38,8 +38,8 @@ CREATE TABLE Competitions (
38
38
DROP TABLE IF EXISTS Inputs;
39
39
CREATE TABLE Inputs (
40
40
iid SERIAL PRIMARY KEY ,
41
- qid FOREIGN KEY references Questions(qid),
42
- uid FOREIGN KEY references Users(id),
41
+ FOREIGN KEY (qid) references Questions(qid),
42
+ FOREIGN KEY (uid) references Users(id),
43
43
input TEXT NOT NULL ,
44
44
solution TEXT NOT NULL
45
45
);
0 commit comments