-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiwdtable.sql
More file actions
26 lines (22 loc) · 967 Bytes
/
iwdtable.sql
File metadata and controls
26 lines (22 loc) · 967 Bytes
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
BEGIN;
CREATE TABLE iw_detection(
-- Primary key
iwd_id int NOT NULL AUTO_INCREMENT,
-- Target page title (with namespace prefix)
iwd_title varchar(256),
-- 0 if doesn't exist; 1 if it does; NULL if we don't know
iwd_exists int DEFAULT NULL,
-- Timestamp of polling Wikipedia. 00000000000000 means we don't know whether the target title
-- exists on Wikipedia.
iwd_polled binary(14) DEFAULT '00000000000000',
-- Timestamp of when this row was orphaned (i.e. when no pages linked to this target anymore)
-- 99999999999999 if it isn't orphaned.
iwd_orphaned binary(14) DEFAULT '99999999999999',
PRIMARY KEY (iwd_id)
)
CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE INDEX iwd_id ON iw_detection (iwd_id);
CREATE INDEX iwd_title ON iw_detection (iwd_title);
CREATE INDEX iwd_exists ON iw_detection (iwd_exists);
CREATE INDEX iwd_polled ON iw_detection (iwd_polled);
COMMIT;