From: Max Semenik Date: Fri, 12 Aug 2011 13:16:06 +0000 (+0000) Subject: Follow-up r94289: SQLite support, unbreaks tests X-Git-Tag: 1.31.0-rc.0~28324 X-Git-Url: http://git.cyclocoop.org/%22%20.%20%20%20%24self2%20.%20%20%20%22&var_mode_affiche=boucle?a=commitdiff_plain;h=b87c77ebb7f1b763de871c603cb65f69a500460e;p=lhc%2Fweb%2Fwiklou.git Follow-up r94289: SQLite support, unbreaks tests --- diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index e4108fa68e..4a939106a6 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -573,4 +573,14 @@ abstract class DatabaseUpdater { $task = $this->maintenance->runChild( 'UpdateCollation' ); $task->execute(); } + + protected function doPopulateRevSha1() { + if ( $this->updateRowExists( 'populate rev_sha1' ) ) { + $this->output( "...rev_sha1/ar_sha1 columns already populated.\n" ); + return; + } + + $task = $this->maintenance->runChild( 'PopulateRevisionSha1' ); + $task->execute(); + } } diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index f95351f162..8acfce1b78 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -858,14 +858,4 @@ class MysqlUpdater extends DatabaseUpdater { $this->applyPatch( 'patch-user-newtalk-timestamp-null.sql' ); $this->output( "done.\n" ); } - - protected function doPopulateRevSha1() { - if ( $this->updateRowExists( 'populate rev_sha1' ) ) { - $this->output( "...rev_sha1/ar_sha1 columns already populated.\n" ); - return; - } - - $task = $this->maintenance->runChild( 'PopulateRevisionSha1' ); - $task->execute(); - } } diff --git a/includes/installer/SqliteUpdater.php b/includes/installer/SqliteUpdater.php index 3b6df6e273..f0a16634dc 100644 --- a/includes/installer/SqliteUpdater.php +++ b/includes/installer/SqliteUpdater.php @@ -63,6 +63,9 @@ class SqliteUpdater extends DatabaseUpdater { // 1.19 array( 'addTable', 'config', 'patch-config.sql' ), array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql'), + array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ), + array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' ), + array( 'doPopulateRevSha1' ), ); } diff --git a/maintenance/populateRevisionSha1.php b/maintenance/populateRevisionSha1.php index 7d93f16894..3e490d10da 100644 --- a/maintenance/populateRevisionSha1.php +++ b/maintenance/populateRevisionSha1.php @@ -30,7 +30,7 @@ class PopulateRevisionSha1 extends Maintenance { } public function execute() { - $db = wfGetDB( DB_MASTER ); + $db = $this->getDB( DB_MASTER ); $this->output( "Populating rev_sha1 column\n" ); $this->doSha1Updates( $db, 'revision', 'rev_id', 'rev' );