Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/219156
Change subject: Don't break update.php ...................................................................... Don't break update.php This maintenance script should no longer automatically run as part of update.php. We've disallowed updating these columns, so update.php will fail should this script still find any incorrect data that needs to be updated. Instead, the script can now still be run manually if need be. When it fails, it'll show instructions on how to proceed. Change-Id: I9099f98b287dfd426a4247782ff00ad6ffde7307 --- M Hooks.php M maintenance/FlowUpdateRevisionContentLength.php 2 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/56/219156/1 diff --git a/Hooks.php b/Hooks.php index a21f8f9..c3c7855 100644 --- a/Hooks.php +++ b/Hooks.php @@ -225,9 +225,6 @@ require_once __DIR__.'/maintenance/FlowPopulateLinksTables.php'; $updater->addPostDatabaseUpdateMaintenance( 'FlowPopulateLinksTables' ); - require_once __DIR__.'/maintenance/FlowUpdateRevisionContentLength.php'; - $updater->addPostDatabaseUpdateMaintenance( 'FlowUpdateRevisionContentLength' ); - require_once __DIR__.'/maintenance/FlowFixLog.php'; $updater->addPostDatabaseUpdateMaintenance( 'FlowFixLog' ); diff --git a/maintenance/FlowUpdateRevisionContentLength.php b/maintenance/FlowUpdateRevisionContentLength.php index e4a9c45..b281979 100644 --- a/maintenance/FlowUpdateRevisionContentLength.php +++ b/maintenance/FlowUpdateRevisionContentLength.php @@ -117,7 +117,16 @@ } $this->updateRevision( $obj, $previous ); - $om->put( $obj ); + + try { + $om->put( $obj ); + } catch ( \Exception $e ) { + $this->error( + 'Failed to update revision ' . $obj->getRevisionId()->getAlphadecimal() . ': ' . $e->getMessage() . "\n". + 'Please make sure rev_content, rev_content_length, rev_flags & rev_previous_content_length are part of RevisionStorage::$allowedUpdateColumns.' + ); + throw $e; + } $this->output( '.' ); } $dbw->commit(); -- To view, visit https://gerrit.wikimedia.org/r/219156 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9099f98b287dfd426a4247782ff00ad6ffde7307 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie <mmul...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits