]> iEval git - gruntmaster-data.git/blame - testdata.sql
Add gruntmaster-opener to EXE_FILES in Makefile.PL
[gruntmaster-data.git] / testdata.sql
CommitLineData
1ea1adc8 1CREATE OR REPLACE FUNCTION tm() RETURNS BIGINT IMMUTABLE LANGUAGE SQL AS $$
4623c9f2
MG
2 SELECT EXTRACT(epoch FROM NOW())::bigint
3$$;
4
1ea1adc8
MG
5TRUNCATE users, contests, problems, jobs RESTART IDENTITY CASCADE;
6
4623c9f2
MG
7-- USERS
8
9INSERT INTO users (id, admin) VALUES ('MGV', TRUE);
10INSERT INTO users (id, admin) VALUES ('nobody', FALSE);
11
12-- CONTESTS
13
14ALTER TABLE contests ALTER owner SET DEFAULT 'MGV';
15
16INSERT INTO contests (id, start, stop, name) VALUES ('fc', tm() - 2000, tm() - 1000, 'Finished contest');
17INSERT INTO contests (id, start, stop, name) VALUES ('rc', tm() - 1000, tm() + 1000, 'Running contest');
18INSERT INTO contests (id, start, stop, name) VALUES ('pc', tm() + 1000, tm() + 2000, 'Pending contest');
19
20-- PROBLEMS
21
22ALTER TABLE problems ALTER generator SET DEFAULT 'Undef',
23 ALTER runner SET DEFAULT 'File',
24 ALTER judge SET DEFAULT 'Absolute',
25 ALTER level SET DEFAULT 'beginner',
26 ALTER value SET DEFAULT 100,
27 ALTER owner SET DEFAULT 'MGV',
28 ALTER statement SET DEFAULT 'Sample Text',
29 ALTER solution SET DEFAULT 'Sample Text',
30 ALTER testcnt SET DEFAULT 1,
31 ALTER timeout SET DEFAULT 1;
32
33INSERT INTO problems (id, name, private) VALUES ('fca', 'FC problem A', FALSE);
34INSERT INTO problems (id, name, private) VALUES ('rca', 'RC problem A', TRUE);
35INSERT INTO problems (id, name, private) VALUES ('pca', 'PC problem A', TRUE);
36INSERT INTO problems (id, name, private) VALUES ('arc', 'Problem in archive', FALSE);
37INSERT INTO problems (id, name, private) VALUES ('prv', 'Private problem', TRUE);
38
39INSERT INTO contest_problems (contest, problem) VALUES ('fc', 'fca');
40INSERT INTO contest_problems (contest, problem) VALUES ('rc', 'rca');
41INSERT INTO contest_problems (contest, problem) VALUES ('pc', 'pca');
42
43INSERT INTO limits (problem, format, timeout) VALUES ('arc', 'C', 0.1);
44INSERT INTO limits (problem, format, timeout) VALUES ('arc', 'CPP', 0.1);
45
46-- JOBS
47
48ALTER TABLE jobs ALTER date SET DEFAULT tm() - 1500,
49 ALTER errors SET DEFAULT 'Errors here',
50 ALTER extension SET DEFAULT 'pl',
51 ALTER format SET DEFAULT 'PERL',
52 ALTER result SET DEFAULT 0,
53 ALTER result_text SET DEFAULT 'Accepted',
54 ALTER results SET DEFAULT '[]',
55 ALTER source SET DEFAULT 'print "Hello, world!"',
56 ALTER owner SET DEFAULT 'nobody';
57
58INSERT INTO jobs (contest, problem, owner) VALUES ('fc', 'fca', 'MGV');
59INSERT INTO jobs (contest, problem, result, result_text, date) VALUES ('fc', 'fca', 1, 'Wrong Answer', tm() - 1600);
60INSERT INTO jobs (contest, problem) VALUES ('fc', 'fca');
61INSERT INTO jobs (problem, date) VALUES ('fca', tm() - 500);
62INSERT INTO jobs (problem, date) VALUES ('arc', tm() - 100);
63INSERT INTO jobs (problem, private, owner) VALUES ('pca', TRUE, 'MGV');
64INSERT INTO jobs (problem, private, owner, result, result_text, results) VALUES ('prv', TRUE, 'MGV', NULL, NULL, NULL);
This page took 0.030208 seconds and 4 git commands to generate.