r102849 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102848‎ | r102849 | r102850 >
Date:09:55, 12 November 2011
Author:catrope
Status:ok
Tags:
Comment:
Allow extensions to add post-update maintenance scripts
Modified paths:
  • /trunk/phase3/includes/installer/DatabaseUpdater.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/DatabaseUpdater.php
@@ -190,6 +190,14 @@
191191 public function addExtensionField( $tableName, $columnName, $sqlPath ) {
192192 $this->extensionUpdates[] = array( 'addField', $tableName, $columnName, $sqlPath, true );
193193 }
 194+
 195+ /**
 196+ * Add a maintenance script to be run after the database updates are complete
 197+ * @param $class string Name of a Maintenance subclass
 198+ */
 199+ public function addPostDatabaseUpdateMaintenance( $class ) {
 200+ $this->postDatabaseUpdateMaintenance[] = $class;
 201+ }
194202
195203 /**
196204 * Get the list of extension-defined updates

Follow-up revisions

RevisionCommit summaryAuthorDate
r102850[RL2] Followup r102817: make the migration script inherit LoggedUpdateMainten...catrope09:56, 12 November 2011

Status & tagging log