protected $shared = false;
+ /**
+ * Scripts to run after database update
+ * Should be a subclass of LoggedUpdateMaintenance
+ */
protected $postDatabaseUpdateMaintenance = array(
'DeleteDefaultMessages',
'PopulateRevisionLength',
/**
* Add a maintenance script to be run after the database updates are complete.
*
+ * Script should subclass LoggedUpdateMaintenance
+ *
* @since 1.19
*
* @param $class string Name of a Maintenance subclass
$updater->doUpdates( $updates );
foreach( $updater->getPostDatabaseUpdateMaintenance() as $maint ) {
- if ( $updater->updateRowExists( $maint ) ) {
+ $child = $this->runChild( $maint );
+
+ // LoggedUpdateMaintenance is checking the updatelog itself
+ $isLoggedUpdate = ( $child instanceof LoggedUpdateMaintenance );
+
+ if ( !$isLoggedUpdate && $updater->updateRowExists( $maint ) ) {
continue;
}
- $child = $this->runChild( $maint );
$child->execute();
- $updater->insertUpdateRow( $maint );
+ if ( !$isLoggedUpdate ) {
+ $updater->insertUpdateRow( $maint );
+ }
}
$this->output( "\nDone.\n" );