r63196 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63195‎ | r63196 | r63197 >
Date:12:38, 3 March 2010
Author:demon
Status:ok
Tags:
Comment:
Rename addDatabaseSpecificTables() -> adjustTablesForDatabase() since it doesn't just add tables. Also make it a no-op by default
Modified paths:
  • /branches/new-installer/phase3/includes/db/SchemaBuilder.php (modified) (history)

Diff [purge]

Index: branches/new-installer/phase3/includes/db/SchemaBuilder.php
@@ -57,7 +57,7 @@
5858 private final function __construct( $schema ) {
5959 wfRunHooks( 'LoadExtensionSchemaUpdates', array( $this ) );
6060 $this->tables = $schema;
61 - $this->addDatabaseSpecificTables();
 61+ $this->adjustTablesForDatabase();
6262 }
6363
6464 /**
@@ -157,10 +157,10 @@
158158 abstract protected function updateTable( $name, $definition, $db );
159159
160160 /**
161 - * Adds database-specific tables to the in-class list.
 161+ * Makes database-specific changes to the schema. No-op by default.
162162 * @return Nothing
163163 */
164 - abstract protected function addDatabaseSpecificTables();
 164+ protected function adjustTablesForDatabase() {}
165165 }
166166
167167 class MysqlSchema extends SchemaBuilder {
@@ -169,7 +169,7 @@
170170 return 'mysql';
171171 }
172172
173 - protected function addDatabaseSpecificTables() {
 173+ protected function adjustTablesForDatabase() {
174174 $this->tables['searchindex'] = array(
175175 'prefix' => 'si',
176176 'fields' => array(
@@ -383,7 +383,7 @@
384384 /**
385385 * @todo: update updatelog with fts3
386386 */
387 - protected function addDatabaseSpecificTables() {
 387+ protected function adjustTablesForDatabase() {
388388 $tmpFile = tempnam( sys_get_temp_dir(), 'mw' );
389389 $db = new DatabaseSqliteStandalone( $tmpFile );
390390 if ( $db->getFulltextSearchModule() == 'FTS3' ) {

Status & tagging log