@@ -10,7 +10,7 @@ CREATE TABLE Users (
1010DROP TABLE IF EXISTS Questions;
1111CREATE TABLE Questions (
1212 qid SERIAL PRIMARY KEY ,
13- cid FOREIGN KEY references Competitions(cid),
13+ FOREIGN (cid) KEY references Competitions(cid),
1414 numParts INTEGER NOT NULL ,
1515 name TEXT NOT NULL ,
1616 pixelArtLine TEXT NOT NULL ,
@@ -19,7 +19,7 @@ CREATE TABLE Questions (
1919
2020DROP TABLE IF EXISTS Parts;
2121CREATE TABLE Parts (
22- qid FOREIGN KEY references Questions(qid),
22+ FOREIGN KEY (qid) references Questions(qid),
2323 description TEXT NOT NULL ,
2424 partNum INTEGER NOT NULL ,
2525 numSolved INTEGER NOT NULL ,
@@ -38,8 +38,8 @@ CREATE TABLE Competitions (
3838DROP TABLE IF EXISTS Inputs;
3939CREATE TABLE Inputs (
4040 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),
4343 input TEXT NOT NULL ,
4444 solution TEXT NOT NULL
4545);
0 commit comments