Index: trunk/phase3/includes/installer/SqliteUpdater.php |
— | — | @@ -63,6 +63,9 @@ |
64 | 64 | // 1.19 |
65 | 65 | array( 'addTable', 'config', 'patch-config.sql' ), |
66 | 66 | 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' ), |
67 | 70 | ); |
68 | 71 | } |
69 | 72 | |
Index: trunk/phase3/includes/installer/DatabaseUpdater.php |
— | — | @@ -573,4 +573,14 @@ |
574 | 574 | $task = $this->maintenance->runChild( 'UpdateCollation' ); |
575 | 575 | $task->execute(); |
576 | 576 | } |
| 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 | + } |
577 | 587 | } |
Index: trunk/phase3/includes/installer/MysqlUpdater.php |
— | — | @@ -858,14 +858,4 @@ |
859 | 859 | $this->applyPatch( 'patch-user-newtalk-timestamp-null.sql' ); |
860 | 860 | $this->output( "done.\n" ); |
861 | 861 | } |
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 | | - } |
872 | 862 | } |
Index: trunk/phase3/maintenance/populateRevisionSha1.php |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | } |
32 | 32 | |
33 | 33 | public function execute() { |
34 | | - $db = wfGetDB( DB_MASTER ); |
| 34 | + $db = $this->getDB( DB_MASTER ); |
35 | 35 | |
36 | 36 | $this->output( "Populating rev_sha1 column\n" ); |
37 | 37 | $this->doSha1Updates( $db, 'revision', 'rev_id', 'rev' ); |