learn-request-queue/db/30-votes.sql

8 lines
191 B
MySQL
Raw Normal View History

2020-08-08 04:32:06 +00:00
CREATE TABLE votes (
requestUrl varchar,
userId int,
PRIMARY KEY (requestUrl,userId),
FOREIGN KEY (requestUrl) REFERENCES requests(url),
FOREIGN KEY (userId) REFERENCES users(userId)
);