| @@ 46-54 (lines=9) @@ | ||
| 43 | ||
| 44 | public function doDBUpdates() { |
|
| 45 | $dbw = $this->getDB( DB_MASTER ); |
|
| 46 | if ( !$dbw->tableExists( 'revision' ) ) { |
|
| 47 | $this->error( "revision table does not exist", true ); |
|
| 48 | } elseif ( !$dbw->tableExists( 'archive' ) ) { |
|
| 49 | $this->error( "archive table does not exist", true ); |
|
| 50 | } elseif ( !$dbw->fieldExists( 'revision', 'rev_len', __METHOD__ ) ) { |
|
| 51 | $this->output( "rev_len column does not exist\n\n", true ); |
|
| 52 | ||
| 53 | return false; |
|
| 54 | } |
|
| 55 | ||
| 56 | $this->output( "Populating rev_len column\n" ); |
|
| 57 | $rev = $this->doLenUpdates( 'revision', 'rev_id', 'rev', Revision::selectFields() ); |
|
| @@ 47-55 (lines=9) @@ | ||
| 44 | protected function doDBUpdates() { |
|
| 45 | $db = $this->getDB( DB_MASTER ); |
|
| 46 | ||
| 47 | if ( !$db->tableExists( 'revision' ) ) { |
|
| 48 | $this->error( "revision table does not exist", true ); |
|
| 49 | } elseif ( !$db->tableExists( 'archive' ) ) { |
|
| 50 | $this->error( "archive table does not exist", true ); |
|
| 51 | } elseif ( !$db->fieldExists( 'revision', 'rev_sha1', __METHOD__ ) ) { |
|
| 52 | $this->output( "rev_sha1 column does not exist\n\n", true ); |
|
| 53 | ||
| 54 | return false; |
|
| 55 | } |
|
| 56 | ||
| 57 | $this->output( "Populating rev_sha1 column\n" ); |
|
| 58 | $rc = $this->doSha1Updates( 'revision', 'rev_id', 'rev' ); |
|