Index: trunk/phase3/maintenance/oracle/archives/patch-globalinterwiki.sql |
— | — | @@ -0,0 +1,8 @@ |
| 2 | +define mw_prefix='{$wgDBprefix}'; |
| 3 | + |
| 4 | +CREATE TABLE &mw_prefix.globalinterwiki ( |
| 5 | + giw_wikiid VARCHAR2(64) NOT NULL, |
| 6 | + giw_prefix VARCHAR2(32) NOT NULL |
| 7 | +); |
| 8 | +CREATE UNIQUE INDEX &mw_prefix.globalinterwiki_u01 ON &mw_prefix.globalinterwiki (giw_wikiid, giw_prefix); |
| 9 | + |
Property changes on: trunk/phase3/maintenance/oracle/archives/patch-globalinterwiki.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 10 | + native |
Index: trunk/phase3/maintenance/oracle/archives/patch-uploadstash.sql |
— | — | @@ -0,0 +1,25 @@ |
| 2 | +define mw_prefix='{$wgDBprefix}'; |
| 3 | + |
| 4 | +CREATE SEQUENCE uploadstash_us_id_seq; |
| 5 | +CREATE TABLE &mw_prefix.uploadstash ( |
| 6 | + us_id NUMBER NOT NULL, |
| 7 | + us_user NUMBER DEFAULT 0 NOT NULL, |
| 8 | + us_key VARCHAR2(255) NOT NULL, |
| 9 | + us_orig_path VARCHAR2(255) NOT NULL, |
| 10 | + us_path VARCHAR2(255) NOT NULL, |
| 11 | + us_source_type VARCHAR2(50), |
| 12 | + us_timestamp TIMESTAMP(6) WITH TIME ZONE, |
| 13 | + us_status VARCHAR2(50) NOT NULL, |
| 14 | + us_size NUMBER NOT NULL, |
| 15 | + us_sha1 VARCHAR2(32) NOT NULL, |
| 16 | + us_mime VARCHAR2(255), |
| 17 | + us_media_type VARCHAR2(32) DEFAULT NULL, |
| 18 | + us_image_width NUMBER, |
| 19 | + us_image_height NUMBER, |
| 20 | + us_image_bits NUMBER |
| 21 | +); |
| 22 | +ALTER TABLE &mw_prefix.uploadstash ADD CONSTRAINT &mw_prefix.uploadstash_pk PRIMARY KEY (us_id); |
| 23 | +ALTER TABLE &mw_prefix.uploadstash ADD CONSTRAINT &mw_prefix.uploadstash_fk1 FOREIGN KEY (us_user) REFERENCES &mw_prefix.mwuser(user_id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED; |
| 24 | +CREATE INDEX &mw_prefix.uploadstash_i01 ON &mw_prefix.uploadstash (us_user); |
| 25 | +CREATE INDEX &mw_prefix.uploadstash_i02 ON &mw_prefix.uploadstash (us_timestamp); |
| 26 | +CREATE UNIQUE INDEX &mw_prefix.uploadstash_u01 ON &mw_prefix.uploadstash (us_key); |
Property changes on: trunk/phase3/maintenance/oracle/archives/patch-uploadstash.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 27 | + native |
Index: trunk/phase3/maintenance/oracle/archives/patch-user_former_groups.sql |
— | — | @@ -0,0 +1,9 @@ |
| 2 | +define mw_prefix='{$wgDBprefix}'; |
| 3 | + |
| 4 | +CREATE TABLE &mw_prefix.user_former_groups ( |
| 5 | + ufg_user NUMBER DEFAULT 0 NOT NULL, |
| 6 | + ufg_group VARCHAR2(16) NOT NULL |
| 7 | +); |
| 8 | +ALTER TABLE &mw_prefix.user_former_groups ADD CONSTRAINT &mw_prefix.user_former_groups_fk1 FOREIGN KEY (ufg_user) REFERENCES &mw_prefix.mwuser(user_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; |
| 9 | +CREATE UNIQUE INDEX &mw_prefix.user_former_groups_u01 ON &mw_prefix.user_former_groups (ufg_user,ufg_group); |
| 10 | + |
Property changes on: trunk/phase3/maintenance/oracle/archives/patch-user_former_groups.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 11 | + native |
Index: trunk/phase3/maintenance/oracle/archives/patch-globaltemplatelinks.sql |
— | — | @@ -0,0 +1,15 @@ |
| 2 | +define mw_prefix='{$wgDBprefix}'; |
| 3 | + |
| 4 | +CREATE TABLE &mw_prefix.globaltemplatelinks ( |
| 5 | + gtl_from_wiki VARCHAR2(64) NOT NULL, |
| 6 | + gtl_from_page NUMBER NOT NULL, |
| 7 | + gtl_from_namespace NUMBER NOT NULL, |
| 8 | + gtl_from_title VARCHAR2(255) NOT NULL, |
| 9 | + gtl_to_prefix VARCHAR2(32) NOT NULL, |
| 10 | + gtl_to_namespace NUMBER NOT NULL, |
| 11 | + gtl_to_namespacetext VARCHAR2(255) NOT NULL, |
| 12 | + gtl_to_title VARCHAR2(255) NOT NULL |
| 13 | +); |
| 14 | +CREATE UNIQUE INDEX &mw_prefix.globaltemplatelinks_u01 ON &mw_prefix.globaltemplatelinks (gtl_to_prefix, gtl_to_namespace, gtl_to_title, gtl_from_wiki, gtl_from_page); |
| 15 | +CREATE UNIQUE INDEX &mw_prefix.globaltemplatelinks_u02 ON &mw_prefix.globaltemplatelinks (gtl_from_wiki, gtl_from_page, gtl_to_prefix, gtl_to_namespace, gtl_to_title); |
| 16 | + |
Property changes on: trunk/phase3/maintenance/oracle/archives/patch-globaltemplatelinks.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 17 | + native |
Index: trunk/phase3/maintenance/oracle/archives/patch-globalnamespaces.sql |
— | — | @@ -0,0 +1,9 @@ |
| 2 | +define mw_prefix='{$wgDBprefix}'; |
| 3 | + |
| 4 | +CREATE TABLE &mw_prefix.globalnamespaces ( |
| 5 | + gn_wiki VARCHAR2(64) NOT NULL, |
| 6 | + gn_namespace NUMBER NOT NULL, |
| 7 | + gn_namespacetext VARCHAR2(255) NOT NULL |
| 8 | +); |
| 9 | +CREATE UNIQUE INDEX &mw_prefix.globalnamespaces_u01 ON &mw_prefix.globalnamespaces (gn_wiki, gn_namespace, gn_namespacetext); |
| 10 | + |
Property changes on: trunk/phase3/maintenance/oracle/archives/patch-globalnamespaces.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 11 | + native |
Index: trunk/phase3/maintenance/oracle/archives/patch-logging_type_action_index.sql |
— | — | @@ -0,0 +1,4 @@ |
| 2 | +define mw_prefix='{$wgDBprefix}'; |
| 3 | + |
| 4 | +CREATE INDEX &mw_prefix.logging_i05 ON &mw_prefix.logging (log_type, log_action, log_timestamp); |
| 5 | + |
Property changes on: trunk/phase3/maintenance/oracle/archives/patch-logging_type_action_index.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 6 | + native |
Index: trunk/phase3/maintenance/oracle/archives/patch-user_email_index.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | 2 | define mw_prefix='{$wgDBprefix}'; |
3 | 3 | |
4 | | -CREATE INDEX &mw_prefix.mwuser_i02 ON &mw_prefix.mwuser (user_email, user_name); |
| 4 | +CREATE INDEX &mw_prefix.mwuser_i02 ON &mw_prefix.mwuser (user_email); |
5 | 5 | |
Index: trunk/phase3/maintenance/oracle/tables.sql |
— | — | @@ -37,6 +37,17 @@ |
38 | 38 | CREATE UNIQUE INDEX &mw_prefix.user_groups_u01 ON &mw_prefix.user_groups (ug_user,ug_group); |
39 | 39 | CREATE INDEX &mw_prefix.user_groups_i01 ON &mw_prefix.user_groups (ug_group); |
40 | 40 | |
| 41 | +CREATE TABLE &mw_prefix.user_former_groups ( |
| 42 | + ufg_user NUMBER DEFAULT 0 NOT NULL, |
| 43 | + ufg_group VARCHAR2(16) NOT NULL |
| 44 | +); |
| 45 | +ALTER TABLE &mw_prefix.user_former_groups ADD CONSTRAINT &mw_prefix.user_former_groups_fk1 FOREIGN KEY (ufg_user) REFERENCES &mw_prefix.mwuser(user_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; |
| 46 | +CREATE UNIQUE INDEX &mw_prefix.user_former_groups_u01 ON &mw_prefix.user_former_groups (ufg_user,ufg_group); |
| 47 | + |
| 48 | + |
| 49 | +CREATE UNIQUE INDEX /*i*/ufg_user_group ON /*_*/user_former_groups (ufg_user,ufg_group); |
| 50 | + |
| 51 | + |
41 | 52 | CREATE TABLE &mw_prefix.user_newtalk ( |
42 | 53 | user_id NUMBER DEFAULT 0 NOT NULL, |
43 | 54 | user_ip VARCHAR2(40) NULL, |
— | — | @@ -355,6 +366,30 @@ |
356 | 367 | CREATE INDEX &mw_prefix.filearchive_i03 ON &mw_prefix.filearchive (fa_deleted_timestamp); |
357 | 368 | CREATE INDEX &mw_prefix.filearchive_i04 ON &mw_prefix.filearchive (fa_user_text,fa_timestamp); |
358 | 369 | |
| 370 | +CREATE SEQUENCE uploadstash_us_id_seq; |
| 371 | +CREATE TABLE &mw_prefix.uploadstash ( |
| 372 | + us_id NUMBER NOT NULL, |
| 373 | + us_user NUMBER DEFAULT 0 NOT NULL, |
| 374 | + us_key VARCHAR2(255) NOT NULL, |
| 375 | + us_orig_path VARCHAR2(255) NOT NULL, |
| 376 | + us_path VARCHAR2(255) NOT NULL, |
| 377 | + us_source_type VARCHAR2(50), |
| 378 | + us_timestamp TIMESTAMP(6) WITH TIME ZONE, |
| 379 | + us_status VARCHAR2(50) NOT NULL, |
| 380 | + us_size NUMBER NOT NULL, |
| 381 | + us_sha1 VARCHAR2(32) NOT NULL, |
| 382 | + us_mime VARCHAR2(255), |
| 383 | + us_media_type VARCHAR2(32) DEFAULT NULL, |
| 384 | + us_image_width NUMBER, |
| 385 | + us_image_height NUMBER, |
| 386 | + us_image_bits NUMBER |
| 387 | +); |
| 388 | +ALTER TABLE &mw_prefix.uploadstash ADD CONSTRAINT &mw_prefix.uploadstash_pk PRIMARY KEY (us_id); |
| 389 | +ALTER TABLE &mw_prefix.uploadstash ADD CONSTRAINT &mw_prefix.uploadstash_fk1 FOREIGN KEY (us_user) REFERENCES &mw_prefix.mwuser(user_id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED; |
| 390 | +CREATE INDEX &mw_prefix.uploadstash_i01 ON &mw_prefix.uploadstash (us_user); |
| 391 | +CREATE INDEX &mw_prefix.uploadstash_i02 ON &mw_prefix.uploadstash (us_timestamp); |
| 392 | +CREATE UNIQUE INDEX &mw_prefix.uploadstash_u01 ON &mw_prefix.uploadstash (us_key); |
| 393 | + |
359 | 394 | CREATE SEQUENCE recentchanges_rc_id_seq; |
360 | 395 | CREATE TABLE &mw_prefix.recentchanges ( |
361 | 396 | rc_id NUMBER NOT NULL, |
— | — | @@ -467,6 +502,7 @@ |
468 | 503 | CREATE INDEX &mw_prefix.logging_i02 ON &mw_prefix.logging (log_user, log_timestamp); |
469 | 504 | CREATE INDEX &mw_prefix.logging_i03 ON &mw_prefix.logging (log_namespace, log_title, log_timestamp); |
470 | 505 | CREATE INDEX &mw_prefix.logging_i04 ON &mw_prefix.logging (log_timestamp); |
| 506 | +CREATE INDEX &mw_prefix.logging_i05 ON &mw_prefix.logging (log_type, log_action, log_timestamp); |
471 | 507 | |
472 | 508 | CREATE TABLE &mw_prefix.log_search ( |
473 | 509 | ls_field VARCHAR2(32) NOT NULL, |
— | — | @@ -644,7 +680,32 @@ |
645 | 681 | ALTER TABLE &mw_prefix.config ADD CONSTRAINT &mw_prefix.config_pk PRIMARY KEY (cf_name); |
646 | 682 | -- leaving index out for now ... |
647 | 683 | |
| 684 | +CREATE TABLE &mw_prefix.globaltemplatelinks ( |
| 685 | + gtl_from_wiki VARCHAR2(64) NOT NULL, |
| 686 | + gtl_from_page NUMBER NOT NULL, |
| 687 | + gtl_from_namespace NUMBER NOT NULL, |
| 688 | + gtl_from_title VARCHAR2(255) NOT NULL, |
| 689 | + gtl_to_prefix VARCHAR2(32) NOT NULL, |
| 690 | + gtl_to_namespace NUMBER NOT NULL, |
| 691 | + gtl_to_namespacetext VARCHAR2(255) NOT NULL, |
| 692 | + gtl_to_title VARCHAR2(255) NOT NULL |
| 693 | +); |
| 694 | +CREATE UNIQUE INDEX &mw_prefix.globaltemplatelinks_u01 ON &mw_prefix.globaltemplatelinks (gtl_to_prefix, gtl_to_namespace, gtl_to_title, gtl_from_wiki, gtl_from_page); |
| 695 | +CREATE UNIQUE INDEX &mw_prefix.globaltemplatelinks_u02 ON &mw_prefix.globaltemplatelinks (gtl_from_wiki, gtl_from_page, gtl_to_prefix, gtl_to_namespace, gtl_to_title); |
648 | 696 | |
| 697 | +CREATE TABLE &mw_prefix.globalnamespaces ( |
| 698 | + gn_wiki VARCHAR2(64) NOT NULL, |
| 699 | + gn_namespace NUMBER NOT NULL, |
| 700 | + gn_namespacetext VARCHAR2(255) NOT NULL |
| 701 | +); |
| 702 | +CREATE UNIQUE INDEX &mw_prefix.globalnamespaces_u01 ON &mw_prefix.globalnamespaces (gn_wiki, gn_namespace, gn_namespacetext); |
| 703 | + |
| 704 | +CREATE TABLE &mw_prefix.globalinterwiki ( |
| 705 | + giw_wikiid VARCHAR2(64) NOT NULL, |
| 706 | + giw_prefix VARCHAR2(32) NOT NULL |
| 707 | +); |
| 708 | +CREATE UNIQUE INDEX &mw_prefix.globalinterwiki_u01 ON &mw_prefix.globalinterwiki (giw_wikiid, giw_prefix); |
| 709 | + |
649 | 710 | -- do not prefix this table as it breaks parserTests |
650 | 711 | CREATE TABLE wiki_field_info_full ( |
651 | 712 | table_name VARCHAR2(35) NOT NULL, |
Index: trunk/phase3/includes/installer/OracleUpdater.php |
— | — | @@ -30,14 +30,20 @@ |
31 | 31 | array( 'doSchemaUpgrade17' ), |
32 | 32 | array( 'doInsertPage0' ), |
33 | 33 | array( 'doRemoveNotNullEmptyDefaults' ), |
| 34 | + array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql' ), |
34 | 35 | |
35 | 36 | //1.18 |
36 | 37 | array( 'addIndex', 'user', 'i02', 'patch-user_email_index.sql' ), |
37 | 38 | array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ), |
| 39 | + array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ), |
38 | 40 | |
39 | | - // 1.19 |
| 41 | + //1.19 |
40 | 42 | array( 'addTable', 'config', 'patch-config.sql' ), |
41 | | - |
| 43 | + array( 'addIndex', 'logging', 'i05', 'patch-logging_type_action_index.sql'), |
| 44 | + array( 'addTable', 'globaltemplatelinks', 'patch-globaltemplatelinks.sql' ), |
| 45 | + array( 'addTable', 'globalnamespaces', 'patch-globalnamespaces.sql' ), |
| 46 | + array( 'addTable', 'globalinterwiki', 'patch-globalinterwiki.sql' ), |
| 47 | + |
42 | 48 | // till 2.0 i guess |
43 | 49 | array( 'doRebuildDuplicateFunction' ), |
44 | 50 | |