aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/fixtures/dev.sql
blob: 46e745f2967acd4456f4d8221a39d3704aeb3894 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
INSERT INTO users
(username, display_name, icon_path, is_admin)
VALUES
    ('a', 'TEST A', NULL, FALSE),
    ('b', 'TEST B', NULL, FALSE),
    ('c', 'TEST C', NULL, TRUE);

INSERT INTO user_auths
(user_id, auth_type, password_hash)
VALUES
    (1, 'password', '$2a$10$5FzjoitnZSFFpIPHEqmnXOQkSKWTLwpR.gqPy50iFg5itOZcqARHq'),
    (2, 'password', '$2a$10$4Wl1M4jQs.GwkB4oT32KvuMQtF.EdqKuOc8z8KKOupnuMJRAVk32W'),
    (3, 'password', '$2a$10$F/TePpu1pyJRWgn0e6A14.VL9D/17sRxT/2DyZ2Oi4Eg/lR6n7JcK');

INSERT INTO problems
(title, description)
VALUES
    ('TEST problem 1', 'This is TEST problem 1'),
    ('TEST problem 2', 'This is TEST problem 2'),
    ('TEST problem 3', 'This is TEST problem 3'),
    ('TEST problem 4', 'This is TEST problem 4'),
    ('TEST problem 5', 'This is TEST problem 5'),
    ('TEST problem 6', 'This is TEST problem 6'),
    ('TEST problem 7', 'This is TEST problem 7');

INSERT INTO games
(game_type, state, display_name, duration_seconds, problem_id)
VALUES
    ('1v1',         'waiting',  'TEST game 1', 180, 1),
    ('1v1',         'closed',   'TEST game 2', 180, 2),
    ('1v1',         'finished', 'TEST game 3', 180, 3),
    ('multiplayer', 'waiting',  'TEST game 4', 180, 4),
    ('multiplayer', 'closed',   'TEST game 5', 180, 5),
    ('multiplayer', 'finished', 'TEST game 6', 180, 6),
    ('multiplayer', 'waiting',  'TEST game 7', 180, 7);

INSERT INTO game_players
(game_id, user_id)
VALUES
    (1, 1),
    (1, 2),
    (2, 1),
    (2, 2),
    (3, 1),
    (3, 2),
    (4, 1),
    (4, 2),
    (5, 1),
    (5, 2),
    (6, 1),
    (6, 2),
    (7, 1);

INSERT INTO testcases
(problem_id, stdin, stdout)
VALUES
    (1, '', '42'),
    (4, '', '42'),
    (7, '', '42');