Index: trunk/phase3/maintenance/postgres/archives/patch-page.sql |
— | — | @@ -0,0 +1,24 @@ |
| 2 | +CREATE SEQUENCE page_page_id_seq; |
| 3 | +CREATE TABLE page ( |
| 4 | + page_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('page_page_id_seq'), |
| 5 | + page_namespace SMALLINT NOT NULL, |
| 6 | + page_title TEXT NOT NULL, |
| 7 | + page_restrictions TEXT, |
| 8 | + page_counter BIGINT NOT NULL DEFAULT 0, |
| 9 | + page_is_redirect SMALLINT NOT NULL DEFAULT 0, |
| 10 | + page_is_new SMALLINT NOT NULL DEFAULT 0, |
| 11 | + page_random NUMERIC(15,14) NOT NULL DEFAULT RANDOM(), |
| 12 | + page_touched TIMESTAMPTZ, |
| 13 | + page_latest INTEGER NOT NULL, |
| 14 | + page_len INTEGER NOT NULL |
| 15 | +); |
| 16 | +CREATE UNIQUE INDEX page_unique_name ON page (page_namespace, page_title); |
| 17 | +CREATE INDEX page_main_title ON page (page_title) WHERE page_namespace = 0; |
| 18 | +CREATE INDEX page_talk_title ON page (page_title) WHERE page_namespace = 1; |
| 19 | +CREATE INDEX page_user_title ON page (page_title) WHERE page_namespace = 2; |
| 20 | +CREATE INDEX page_utalk_title ON page (page_title) WHERE page_namespace = 3; |
| 21 | +CREATE INDEX page_project_title ON page (page_title) WHERE page_namespace = 4; |
| 22 | +CREATE INDEX page_mediawiki_title ON page (page_title) WHERE page_namespace = 8; |
| 23 | +CREATE INDEX page_random_idx ON page (page_random); |
| 24 | +CREATE INDEX page_len_idx ON page (page_len); |
| 25 | + |
Index: trunk/phase3/includes/installer/PostgresUpdater.php |
— | — | @@ -40,6 +40,7 @@ |
41 | 41 | # new tables |
42 | 42 | array( 'addTable', 'category', 'patch-category.sql' ), |
43 | 43 | array( 'addTable', 'mwuser', 'patch-mwuser.sql' ), |
| 44 | + array( 'addTable', 'page', 'patch-page.sql' ), |
44 | 45 | array( 'addTable', 'pagecontent', 'patch-pagecontent.sql' ), |
45 | 46 | array( 'addTable', 'querycachetwo', 'patch-querycachetwo.sql' ), |
46 | 47 | array( 'addTable', 'page_props', 'patch-page_props.sql' ), |