* Sets the number of active users in the site_stats table
*/
protected function doActiveUsersInit() {
- $activeUsers = $this->db->selectField( 'site_stats', 'ss_active_users', false, __METHOD__ );
+ $activeUsers = $this->db->selectField( 'site_stats', 'ss_active_users', '', __METHOD__ );
if ( $activeUsers == -1 ) {
$activeUsers = $this->db->selectField( 'recentchanges',
'COUNT( DISTINCT rc_user_text )',
"maintenance/migrateComments.php.\n"
);
$task = $this->maintenance->runChild( MigrateComments::class, 'migrateComments.php' );
- $task->execute();
+ $ok = $task->execute();
$this->output( $ok ? "done.\n" : "errors were encountered.\n" );
}
}
$this->output( "done.\n" );
}
+ /**
+ * Populate ar_rev_id, then make it not nullable
+ * @since 1.31
+ */
+ protected function populateArchiveRevId() {
+ $info = $this->db->fieldInfo( 'archive', 'ar_rev_id', __METHOD__ );
+ if ( !$info ) {
+ throw new MWException( 'Missing ar_rev_id field of archive table. Should not happen.' );
+ }
+ if ( $info->isNullable() ) {
+ $this->output( "Populating ar_rev_id.\n" );
+ $task = $this->maintenance->runChild( 'PopulateArchiveRevId', 'populateArchiveRevId.php' );
+ if ( $task->execute() ) {
+ $this->applyPatch( 'patch-ar_rev_id-not-null.sql', false,
+ 'Making ar_rev_id not nullable' );
+ }
+ }
+ }
+
}