parent
b479cd2948
commit
68faec1ae8
7 changed files with 207 additions and 16 deletions
|
@ -2,6 +2,6 @@ CREATE TABLE votes (
|
|||
requestUrl varchar,
|
||||
userId int,
|
||||
PRIMARY KEY (requestUrl,userId),
|
||||
FOREIGN KEY (requestUrl) REFERENCES requests(url),
|
||||
FOREIGN KEY (userId) REFERENCES users(userId)
|
||||
FOREIGN KEY (requestUrl) REFERENCES requests(url) ON DELETE CASCADE,
|
||||
FOREIGN KEY (userId) REFERENCES users(userId) ON DELETE CASCADE
|
||||
);
|
||||
|
|
|
@ -3,5 +3,5 @@ CREATE TABLE scores (
|
|||
score int NOT NULL DEFAULT 0,
|
||||
scoreModifier int NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (url),
|
||||
FOREIGN KEY (url) REFERENCES requests(url)
|
||||
FOREIGN KEY (url) REFERENCES requests(url) ON DELETE CASCADE
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue