-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathschema.sql
48 lines (42 loc) · 1.09 KB
/
schema.sql
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
// Database s53905__authors on toolforge:
create table batch_manager(
user VARCHAR(100) NOT NULL,
manager_pid INT UNSIGNED,
PRIMARY KEY(user)
);
create table batches(
batch_id VARCHAR(20) NOT NULL,
owner VARCHAR(200) NOT NULL,
process_id INT UNSIGNED,
start TIMESTAMP NOT NULL,
queued BOOLEAN NOT NULL DEFAULT 0,
PRIMARY KEY(batch_id)
);
create table commands(
ordinal SMALLINT UNSIGNED NOT NULL,
batch_id VARCHAR(20) NOT NULL,
action VARCHAR(20) NOT NULL,
data MEDIUMTEXT,
status ENUM('READY', 'RUNNING', 'DONE', 'ERROR') NOT NULL,
message VARCHAR(1000),
run TIMESTAMP NULL,
PRIMARY KEY(batch_id, ordinal),
FOREIGN KEY (batch_id)
REFERENCES batches(batch_id)
ON DELETE CASCADE
);
create table rate_limit_table(last_time BIGINT);
create table author_lists (
list_id MEDIUMINT NOT NULL AUTO_INCREMENT,
owner VARCHAR(200) NOT NULL,
label VARCHAR(200),
updated TIMESTAMP NOT NULL,
authors MEDIUMTEXT,
PRIMARY KEY(list_id)
);
create table sessions (
id VARCHAR(128) NOT NULL,
timestamp INT(10) unsigned DEFAULT NULL,
data MEDIUMTEXT,
PRIMARY KEY(id)
);