X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Finstaller%2FMysqlUpdater.php;h=bce469053b19a34869922573b9f6a88f792502bb;hb=8269ed4dfd5e4395e25945b1fa2ed391684606ed;hp=bce540557d90e708c60c6bc92a2137ce419f6825;hpb=16ef3e79c4c52aa6b74563b7eadcfc9792e7a4c4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index bce540557d..bce469053b 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -336,6 +336,8 @@ class MysqlUpdater extends DatabaseUpdater { [ 'addTable', 'slot_roles', 'patch-slot_roles.sql' ], [ 'addTable', 'content_models', 'patch-content_models.sql' ], [ 'migrateArchiveText' ], + [ 'addTable', 'actor', 'patch-actor-table.sql' ], + [ 'migrateActors' ], ]; } @@ -472,6 +474,17 @@ class MysqlUpdater extends DatabaseUpdater { return; } + $insertOpts = [ 'IGNORE' ]; + $selectOpts = []; + + // If wl_id exists, make insertSelect() more replication-safe by + // ordering on that column. If not, hint that it should be safe anyway. + if ( $this->db->fieldExists( 'watchlist', 'wl_id', __METHOD__ ) ) { + $selectOpts['ORDER BY'] = 'wl_id'; + } else { + $insertOpts[] = 'NO_AUTO_COLUMNS'; + } + $this->output( "Adding missing watchlist talk page rows... " ); $this->db->insertSelect( 'watchlist', 'watchlist', [ @@ -479,7 +492,7 @@ class MysqlUpdater extends DatabaseUpdater { 'wl_namespace' => 'wl_namespace | 1', 'wl_title' => 'wl_title', 'wl_notificationtimestamp' => 'wl_notificationtimestamp' - ], [ 'NOT (wl_namespace & 1)' ], __METHOD__, 'IGNORE' ); + ], [ 'NOT (wl_namespace & 1)' ], __METHOD__, $insertOpts, $selectOpts ); $this->output( "done.\n" ); $this->output( "Adding missing watchlist subject page rows... " ); @@ -489,7 +502,7 @@ class MysqlUpdater extends DatabaseUpdater { 'wl_namespace' => 'wl_namespace & ~1', 'wl_title' => 'wl_title', 'wl_notificationtimestamp' => 'wl_notificationtimestamp' - ], [ 'wl_namespace & 1' ], __METHOD__, 'IGNORE' ); + ], [ 'wl_namespace & 1' ], __METHOD__, $insertOpts, $selectOpts ); $this->output( "done.\n" ); } @@ -901,7 +914,8 @@ class MysqlUpdater extends DatabaseUpdater { 'tl_title' => 'pl_title' ], [ 'pl_namespace' => 10 - ], __METHOD__ + ], __METHOD__, + [ 'NO_AUTO_COLUMNS' ] // There's no "tl_id" auto-increment field ); } $this->output( "Done. Please run maintenance/refreshLinks.php for a more " .