r94345 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94344‎ | r94345 | r94346 >
Date:13:16, 12 August 2011
Author:maxsem
Status:reverted (Comments)
Tags:
Comment:
Follow-up r94289: SQLite support, unbreaks tests
Modified paths:
  • /trunk/phase3/includes/installer/DatabaseUpdater.php (modified) (history)
  • /trunk/phase3/includes/installer/MysqlUpdater.php (modified) (history)
  • /trunk/phase3/includes/installer/SqliteUpdater.php (modified) (history)
  • /trunk/phase3/maintenance/populateRevisionSha1.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/SqliteUpdater.php
@@ -63,6 +63,9 @@
6464 // 1.19
6565 array( 'addTable', 'config', 'patch-config.sql' ),
6666 array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql'),
 67+ array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ),
 68+ array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' ),
 69+ array( 'doPopulateRevSha1' ),
6770 );
6871 }
6972
Index: trunk/phase3/includes/installer/DatabaseUpdater.php
@@ -573,4 +573,14 @@
574574 $task = $this->maintenance->runChild( 'UpdateCollation' );
575575 $task->execute();
576576 }
 577+
 578+ protected function doPopulateRevSha1() {
 579+ if ( $this->updateRowExists( 'populate rev_sha1' ) ) {
 580+ $this->output( "...rev_sha1/ar_sha1 columns already populated.\n" );
 581+ return;
 582+ }
 583+
 584+ $task = $this->maintenance->runChild( 'PopulateRevisionSha1' );
 585+ $task->execute();
 586+ }
577587 }
Index: trunk/phase3/includes/installer/MysqlUpdater.php
@@ -858,14 +858,4 @@
859859 $this->applyPatch( 'patch-user-newtalk-timestamp-null.sql' );
860860 $this->output( "done.\n" );
861861 }
862 -
863 - protected function doPopulateRevSha1() {
864 - if ( $this->updateRowExists( 'populate rev_sha1' ) ) {
865 - $this->output( "...rev_sha1/ar_sha1 columns already populated.\n" );
866 - return;
867 - }
868 -
869 - $task = $this->maintenance->runChild( 'PopulateRevisionSha1' );
870 - $task->execute();
871 - }
872862 }
Index: trunk/phase3/maintenance/populateRevisionSha1.php
@@ -30,7 +30,7 @@
3131 }
3232
3333 public function execute() {
34 - $db = wfGetDB( DB_MASTER );
 34+ $db = $this->getDB( DB_MASTER );
3535
3636 $this->output( "Populating rev_sha1 column\n" );
3737 $this->doSha1Updates( $db, 'revision', 'rev_id', 'rev' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r94541Revert r94289, r94290, r94294, r94333, r94345, r94362, r94370 -- core schema ...brion18:24, 15 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94289* Added rev_sha1 and ar_sha1 columns to revision/archive tables (useful for b......aaron21:52, 11 August 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   18:27, 15 August 2011

undiscussed core schema change, reverted in r94541.

Status & tagging log