r109909 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109908‎ | r109909 | r109910 >
Date:09:48, 24 January 2012
Author:freakolowsky
Status:ok
Tags:notmysql 
Comment:
* Oracle schema update to latest (tested with phpunit)
* Fixed a message typo in DatabaseUpdater
Modified paths:
  • /trunk/phase3/includes/installer/DatabaseUpdater.php (modified) (history)
  • /trunk/phase3/includes/installer/OracleUpdater.php (modified) (history)
  • /trunk/phase3/maintenance/oracle/archives/patch-job_timestamp_field.sql (added) (history)
  • /trunk/phase3/maintenance/oracle/archives/patch-job_timestamp_index.sql (added) (history)
  • /trunk/phase3/maintenance/oracle/archives/patch-us_chunk_inx_field.sql (added) (history)
  • /trunk/phase3/maintenance/oracle/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/oracle/archives/patch-job_timestamp_index.sql
@@ -0,0 +1,4 @@
 2+define mw_prefix='{$wgDBprefix}';
 3+
 4+CREATE INDEX &mw_prefix.job_i02 ON &mw_prefix.job (job_timestamp);
 5+
Property changes on: trunk/phase3/maintenance/oracle/archives/patch-job_timestamp_index.sql
___________________________________________________________________
Added: svn:eol-style
16 + native
Index: trunk/phase3/maintenance/oracle/archives/patch-job_timestamp_field.sql
@@ -0,0 +1,4 @@
 2+define mw_prefix='{$wgDBprefix}';
 3+
 4+ALTER TABLE &mw_prefix.job ADD job_timestamp TIMESTAMP(6) WITH TIME ZONE NULL;
 5+
Property changes on: trunk/phase3/maintenance/oracle/archives/patch-job_timestamp_field.sql
___________________________________________________________________
Added: svn:eol-style
16 + native
Index: trunk/phase3/maintenance/oracle/archives/patch-us_chunk_inx_field.sql
@@ -0,0 +1,4 @@
 2+define mw_prefix='{$wgDBprefix}';
 3+
 4+ALTER TABLE &mw_prefix.uploadstash ADD us_chunk_inx NUMBER;
 5+
Property changes on: trunk/phase3/maintenance/oracle/archives/patch-us_chunk_inx_field.sql
___________________________________________________________________
Added: svn:eol-style
16 + native
Index: trunk/phase3/maintenance/oracle/tables.sql
@@ -375,6 +375,7 @@
376376 us_source_type VARCHAR2(50),
377377 us_timestamp TIMESTAMP(6) WITH TIME ZONE,
378378 us_status VARCHAR2(50) NOT NULL,
 379+ us_chunk_inx NUMBER,
379380 us_size NUMBER NOT NULL,
380381 us_sha1 VARCHAR2(32) NOT NULL,
381382 us_mime VARCHAR2(255),
@@ -518,10 +519,12 @@
519520 job_cmd VARCHAR2(60) NOT NULL,
520521 job_namespace NUMBER DEFAULT 0 NOT NULL,
521522 job_title VARCHAR2(255) NOT NULL,
 523+ job_timestamp TIMESTAMP(6) WITH TIME ZONE NULL,
522524 job_params CLOB NOT NULL
523525 );
524526 ALTER TABLE &mw_prefix.job ADD CONSTRAINT &mw_prefix.job_pk PRIMARY KEY (job_id);
525527 CREATE INDEX &mw_prefix.job_i01 ON &mw_prefix.job (job_cmd, job_namespace, job_title);
 528+CREATE INDEX &mw_prefix.job_i02 ON &mw_prefix.job (job_timestamp);
526529
527530 CREATE TABLE &mw_prefix.querycache_info (
528531 qci_type VARCHAR2(32) NOT NULL,
Index: trunk/phase3/includes/installer/DatabaseUpdater.php
@@ -465,9 +465,9 @@
466466 */
467467 protected function addIndex( $table, $index, $patch, $fullpath = false ) {
468468 if ( $this->db->indexExists( $table, $index, __METHOD__ ) ) {
469 - $this->output( "...$index key already set on $table table.\n" );
 469+ $this->output( "...index $index already set on $table table.\n" );
470470 } else {
471 - $this->output( "Adding $index key to table $table... " );
 471+ $this->output( "Adding index $index to table $table... " );
472472 $this->applyPatch( $patch, $fullpath );
473473 $this->output( "done.\n" );
474474 }
Index: trunk/phase3/includes/installer/OracleUpdater.php
@@ -49,6 +49,9 @@
5050 array( 'doRemoveNotNullEmptyDefaults2' ),
5151 array( 'addIndex', 'page', 'i03', 'patch-page_redirect_namespace_len.sql' ),
5252 array( 'modifyField', 'user', 'ug_group', 'patch-ug_group-length-increase.sql' ),
 53+ array( 'addField', 'uploadstash', 'us_chunk_inx', 'patch-us_chunk_inx_field.sql' ),
 54+ array( 'addField', 'job', 'job_timestamp', 'patch-job_timestamp_field.sql' ),
 55+ array( 'addIndex', 'job', 'i02', 'patch-job_timestamp_index.sql' ),
5356
5457 // KEEP THIS AT THE BOTTOM!!
5558 array( 'doRebuildDuplicateFunction' ),

Status & tagging log