2021-02-23 06:54:47 +00:00
|
|
|
INSERT INTO users (userid,displayName) VALUES
|
|
|
|
(001,'TestUser'),
|
|
|
|
(002,'TestFollower'),
|
|
|
|
(003,'TestSubscriber'),
|
|
|
|
(004,'TestSubNonFollower');
|
|
|
|
|
|
|
|
INSERT INTO follows (userid) VALUES
|
|
|
|
(002),
|
|
|
|
(003);
|
|
|
|
|
|
|
|
INSERT INTO subscriptions (userid) VALUES
|
|
|
|
(003),
|
|
|
|
(004);
|
2020-08-08 04:32:06 +00:00
|
|
|
|
|
|
|
CALL add_request('https://www.youtube.com/watch?v=dQw4w9WgXcQ',001);
|
|
|
|
CALL add_request('https://www.youtube.com/watch?v=C5oeWHngDS4',002);
|
|
|
|
CALL add_request('https://www.youtube.com/watch?v=vXaJGBLRA_o',003);
|
|
|
|
|
|
|
|
UPDATE requests SET state = 'Rejected' WHERE url = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
|
|
|
|
|
|
|
|
INSERT INTO votes (requestUrl,userid) VALUES
|
|
|
|
('https://www.youtube.com/watch?v=C5oeWHngDS4',001),
|
|
|
|
('https://www.youtube.com/watch?v=C5oeWHngDS4',003);
|
|
|
|
|
|
|
|
CALL update_scores();
|