-
-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathwiki_test.up.sql
More file actions
49 lines (44 loc) · 1.82 KB
/
wiki_test.up.sql
File metadata and controls
49 lines (44 loc) · 1.82 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
CREATE TABLE `page` (
`page_id` int(8) unsigned NOT NULL,
`page_namespace` int(11) NOT NULL,
`page_title` varbinary(255) NOT NULL,
`page_touched` varbinary(14) NOT NULL DEFAULT ''
);
CREATE TABLE `categorylinks` (
`cl_from` int(8) unsigned NOT NULL DEFAULT 0,
`cl_to` varbinary(255) NOT NULL DEFAULT '',
`cl_sortkey` varbinary(230) NOT NULL DEFAULT '',
`cl_timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
`cl_sortkey_prefix` varbinary(255) NOT NULL DEFAULT '',
`cl_type` enum('page','subcat','file') NOT NULL DEFAULT 'page',
`cl_collation_id` smallint(5) unsigned NOT NULL DEFAULT 0,
`cl_target_id` bigint(20) unsigned
);
CREATE TABLE `redirect` (
`rd_from` int(8) unsigned NOT NULL DEFAULT 0,
`rd_namespace` int(11) NOT NULL DEFAULT 0,
`rd_title` varbinary(255) NOT NULL DEFAULT '',
`rd_interwiki` varbinarY(32) DEFAULT NULL,
`rd_fragment` varbinary(255) DEFAULT NULL
);
CREATE TABLE `revision` (
`rev_id` int(8) unsigned NOT NULL DEFAULT 0,
`rev_page` int(8) unsigned NOT NULL DEFAULT 0,
`rev_text_id` bigint(10) unsigned DEFAULT NULL,
`rev_comment_id` decimal(20,0) DEFAULT NULL,
`rev_actor` decimal(20,0) DEFAULT NULL,
`rev_timestamp` varbinary(14) NOT NULL DEFAULT '',
`rev_minor_edit` tinyint(1) unsigned NOT NULL DEFAULT 0,
`rev_deleted` tinyint(1) unsigned NOT NULL DEFAULT 0,
`rev_len` int(8) unsigned DEFAULT NULL,
`rev_parent_id` int(8) unsigned DEFAULT NULL,
`rev_sha1` varbinary(32) DEFAULT NULL,
`rev_content_model` varbinary(32) DEFAULT NULL,
`rev_content_format` varbinary(64) DEFAULT NULL
);
CREATE TABLE `linktarget` (
`lt_id` bigint(20) unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
`lt_namespace` int(11) NOT NULL,
`lt_title` varchar(255) NOT NULL
);
INSERT INTO `linktarget` (lt_id, lt_namespace, lt_title) VALUES (500, 14, 'Wikipedia_1.0_assessments');