-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.sql
More file actions
119 lines (119 loc) · 1.8 KB
/
Copy pathdata.sql
File metadata and controls
119 lines (119 loc) · 1.8 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
CREATE TABLE contest (
id int,
title longtext,
starttime int,
duration int,
type int,
rated boolean,
tags longtext,
problems longtext,
password text,
info longtext,
uid int
);
CREATE TABLE contest_ranking (
id int,
uid int,
score int,
time int,
time2 int,
info longtext,
penalty int
);
CREATE TABLE contest_signup (
id int,
uid int
);
CREATE TABLE session (
uid int,
session longtext,
time int
);
CREATE TABLE problem (
id int,
alias text,
title text,
bg longtext,
descrip longtext,
input longtext,
output longtext,
cases longtext,
hint longtext,
hidden boolean,
banned boolean,
difficulty int,
tags longtext,
uid int,
groups longtext,
langs longtext
);
CREATE TABLE submission (
id int,
uid int,
pid int,
lang int,
code longtext,
result longtext,
time int,
status int,
score int,
judged boolean,
contest int
);
CREATE TABLE tags (
id int,
title text,
type int
);
CREATE TABLE userGroup (
id int,
title text,
description longtext,
permission int
);
DELETE FROM userGroup WHERE id = 1 OR id = 2;
INSERT INTO userGroup VALUES (
1,
'Default',
'Default group for all users',
393
);
INSERT INTO userGroup VALUES (
2,
'Admin',
'Administrators',
2047
);
CREATE TABLE user (
id int,
title text,
name text,
idNumber text,
idType int,
typeName text,
unitId int,
unitName text,
sex int,
password text,
createTime int,
rating int,
groups longtext,
info longtext
);
DELETE FROM user WHERE id = 0;
INSERT INTO user VALUES (
0,
'Anonymous',
'',
'',
0,
'',
0,
'',
0,
'',
0,
0,
'[1]',
''
);