4 * @subpackage Maintenance
9 require_once 'convertLinks.inc';
10 require_once 'InitialiseMessages.inc';
11 require_once 'userDupes.inc';
13 $wgRenamedTables = array(
15 # array( 'group', 'groups', 'patch-rename-group.sql' ),
19 # table patch file (in maintenance/archives)
20 array( 'hitcounter', 'patch-hitcounter.sql' ),
21 array( 'querycache', 'patch-querycache.sql' ),
22 array( 'objectcache', 'patch-objectcache.sql' ),
23 array( 'categorylinks', 'patch-categorylinks.sql' ),
24 array( 'logging', 'patch-logging.sql' ),
25 array( 'validate', 'patch-validate.sql' ),
26 array( 'user_newtalk', 'patch-usernewtalk2.sql' ),
27 array( 'transcache', 'patch-transcache.sql' ),
28 array( 'trackbacks', 'patch-trackbacks.sql' ),
32 # table field patch file (in maintenance/archives)
33 array( 'ipblocks', 'ipb_id', 'patch-ipblocks.sql' ),
34 array( 'ipblocks', 'ipb_expiry', 'patch-ipb_expiry.sql' ),
35 array( 'recentchanges', 'rc_type', 'patch-rc_type.sql' ),
36 array( 'recentchanges', 'rc_ip', 'patch-rc_ip.sql' ),
37 array( 'recentchanges', 'rc_id', 'patch-rc_id.sql' ),
38 array( 'recentchanges', 'rc_patrolled', 'patch-rc-patrol.sql' ),
39 array( 'user', 'user_real_name', 'patch-user-realname.sql' ),
40 array( 'user', 'user_token', 'patch-user_token.sql' ),
41 array( 'user', 'user_email_token', 'patch-user_email_token.sql' ),
42 array( 'logging', 'log_params', 'patch-log_params.sql' ),
43 array( 'archive', 'ar_rev_id', 'patch-archive-rev_id.sql' ),
44 array( 'archive', 'ar_text_id', 'patch-archive-text_id.sql' ),
45 array( 'page', 'page_len', 'patch-page_len.sql' ),
46 array( 'revision', 'rev_deleted', 'patch-rev_deleted.sql' ),
47 array( 'image', 'img_width', 'patch-img_width.sql' ),
48 array( 'image', 'img_metadata', 'patch-img_metadata.sql' ),
49 array( 'image', 'img_media_type', 'patch-img_media_type.sql' ),
50 array( 'validate', 'val_ip', 'patch-val_ip.sql' ),
51 array( 'site_stats', 'ss_total_pages', 'patch-ss_total_articles.sql' ),
52 array( 'interwiki', 'iw_trans', 'patch-interwiki-trans.sql' ),
53 array( 'ipblocks', 'ipb_range_start', 'patch-ipb_range_start.sql' ),
56 function rename_table( $from, $to, $patch ) {
58 if ( $wgDatabase->tableExists( $from ) ) {
59 if ( $wgDatabase->tableExists( $to ) ) {
60 echo "...can't move table $from to $to, $to already exists.\n";
62 echo "Moving table $from to $to...";
63 dbsource( archive($patch), $wgDatabase );
67 // Source table does not exist
68 // Renames are done before creations, so this is typical for a new installation
73 function add_table( $name, $patch ) {
75 if ( $wgDatabase->tableExists( $name ) ) {
76 echo "...$name table already exists.\n";
78 echo "Creating $name table...";
79 dbsource( archive($patch), $wgDatabase );
84 function add_field( $table, $field, $patch ) {
86 if ( !$wgDatabase->tableExists( $table ) ) {
87 echo "...$table table does not exist, skipping new field patch\n";
88 } elseif ( $wgDatabase->fieldExists( $table, $field ) ) {
89 echo "...have $field field in $table table.\n";
91 echo "Adding $field field to table $table...";
92 dbsource( archive($patch) , $wgDatabase );
97 function do_revision_updates() {
98 global $wgSoftwareRevision;
99 if ( $wgSoftwareRevision < 1001 ) {
104 function update_passwords() {
105 wfDebugDieBacktrace( "This function needs to be updated or removed.\n" );
108 $fname = "Update script: update_passwords()";
109 print "\nIt appears that you need to update the user passwords in your\n" .
110 "database. If you have already done this (if you've run this update\n" .
111 "script once before, for example), doing so again will make all your\n" .
112 "user accounts inaccessible, so be sure you only do this once.\n" .
113 "Update user passwords? (yes/no)";
115 $resp = readconsole();
116 if ( ! ( "Y" == $resp{0} || "y" == $resp{0} ) ) { return; }
118 $sql = "SELECT user_id,user_password FROM user";
119 $source = $wgDatabase->query( $sql, $fname );
121 while ( $row = $wgDatabase->fetchObject( $source ) ) {
123 $oldpass = $row->user_password;
124 $newpass = md5( "{$id}-{$oldpass}" );
126 $sql = "UPDATE user SET user_password='{$newpass}' " .
127 "WHERE user_id={$id}";
128 $wgDatabase->query( $sql, $fname );
132 function do_interwiki_update() {
133 # Check that interwiki table exists; if it doesn't source it
135 if( $wgDatabase->tableExists( "interwiki" ) ) {
136 echo "...already have interwiki table\n";
139 echo "Creating interwiki table: ";
140 dbsource( archive("patch-interwiki.sql") );
142 echo "Adding default interwiki definitions: ";
143 dbsource( "maintenance/interwiki.sql" );
147 function do_index_update() {
148 # Check that proper indexes are in place
150 $meta = $wgDatabase->fieldInfo( "recentchanges", "rc_timestamp" );
151 if( $meta->multiple_key == 0 ) {
152 echo "Updating indexes to 20031107: ";
153 dbsource( archive("patch-indexes.sql") );
157 echo "...indexes seem up to 20031107 standards\n";
161 function do_image_index_update() {
164 $meta = $wgDatabase->fieldInfo( "image", "img_major_mime" );
165 if( $meta->multiple_key == 0 ) {
166 echo "Updating indexes to 20050912: ";
167 dbsource( archive("patch-mimesearch-indexes.sql") );
171 echo "...indexes seem up to 20050912 standards\n";
175 function do_image_name_unique_update() {
177 if( $wgDatabase->indexExists( 'image', 'PRIMARY' ) ) {
178 echo "...image primary key already set.\n";
180 echo "Making img_name the primary key... ";
181 dbsource( archive("patch-image_name_primary.sql"), $wgDatabase );
186 function do_logging_timestamp_index() {
188 if( $wgDatabase->indexExists( 'logging', 'times' ) ) {
189 echo "...timestamp key on logging already exists.\n";
191 echo "Adding timestamp key on logging table... ";
192 dbsource( archive("patch-logging-times-index.sql"), $wgDatabase );
198 function do_watchlist_update() {
200 if( $wgDatabase->fieldExists( 'watchlist', 'wl_notificationtimestamp' ) ) {
201 echo "The watchlist table is already set up for email notification.\n";
203 echo "Adding wl_notificationtimestamp field for email notification management.";
204 /* ALTER TABLE watchlist ADD (wl_notificationtimestamp varchar(14) binary NOT NULL default '0'); */
205 dbsource( "maintenance/archives/patch-email-notification.sql", $wgDatabase );
210 function do_copy_newtalk_to_watchlist() {
212 global $wgCommandLineMode; # this needs to be saved while getID() and getName() are called
214 $res = $wgDatabase->safeQuery( 'SELECT user_id, user_ip FROM !',
215 $wgDatabase->tableName( 'user_newtalk' ) );
216 $num_newtalks=$wgDatabase->numRows($res);
217 echo "Now converting ".$num_newtalks." user_newtalk entries to watchlist table entries ... \n";
220 for ( $i = 1; $i <= $num_newtalks; $i++ ) {
221 $wluser = $wgDatabase->fetchObject( $res );
222 if ($wluser->user_id == 0) { # anonymous users ... have IP numbers as "names"
223 if ($user->isIP($wluser->user_ip)) { # do only if it really looks like an IP number (double checked)
224 $wgDatabase->replace( 'watchlist',
225 array(array('wl_user','wl_namespace', 'wl_title', 'wl_notificationtimestamp' )),
226 array('wl_user' => 0,
227 'wl_namespace' => NS_USER_TALK,
228 'wl_title' => $wluser->user_ip,
229 'wl_notificationtimestamp' => '19700101000000'
230 ), 'updaters.inc::do_watchlist_update2'
233 } else { # normal users ... have user_ids
234 $user->setID($wluser->user_id);
235 $wgDatabase->replace( 'watchlist',
236 array(array('wl_user','wl_namespace', 'wl_title', 'wl_notificationtimestamp' )),
237 array('wl_user' => $user->getID(),
238 'wl_namespace' => NS_USER_TALK,
239 'wl_title' => $user->getName(),
240 'wl_notificationtimestamp' => '19700101000000'
241 ), 'updaters.inc::do_watchlist_update3'
249 function do_user_update() {
251 if( $wgDatabase->fieldExists( 'user', 'user_emailauthenticationtimestamp' ) ) {
252 echo "User table contains old email authentication field. Dropping... ";
253 dbsource( "maintenance/archives/patch-email-authentication.sql", $wgDatabase );
256 echo "...user table does not contain old email authentication field.\n";
261 * 1.4 betas were missing the 'binary' marker from logging.log_title,
262 * which causes a collation mismatch error on joins in MySQL 4.1.
264 function do_logging_encoding() {
265 global $wgDatabase, $wgDBtype;
266 if ($wgDBtype != 'mysql')
268 $logging = $wgDatabase->tableName( 'logging' );
269 $res = $wgDatabase->query( "SELECT log_title FROM $logging LIMIT 0" );
270 $flags = explode( ' ', mysql_field_flags( $res, 0 ) );
271 $wgDatabase->freeResult( $res );
273 if( in_array( 'binary', $flags ) ) {
274 echo "Logging table has correct title encoding.\n";
276 echo "Fixing title encoding on logging table... ";
277 dbsource( 'maintenance/archives/patch-logging-title.sql', $wgDatabase );
282 function do_schema_restructuring() {
284 $fname="do_schema_restructuring";
285 if ( $wgDatabase->tableExists( 'page' ) ) {
286 echo "...page table already exists.\n";
288 echo "...converting from cur/old to page/revision/text DB structure.\n"; flush();
290 echo "......checking for duplicate entries.\n"; flush();
292 extract( $wgDatabase->tableNames( 'cur', 'old', 'page', 'revision', 'text' ) );
294 $rows = $wgDatabase->query( "SELECT cur_title, cur_namespace, COUNT(cur_namespace) AS c
295 FROM $cur GROUP BY cur_title, cur_namespace HAVING c>1", $fname );
297 if ( $wgDatabase->numRows( $rows ) > 0 ) {
299 echo "......<b>Found duplicate entries</b>\n";
300 echo ( sprintf( "<b> %-60s %3s %5s</b>\n", 'Title', 'NS', 'Count' ) );
301 while ( $row = $wgDatabase->fetchObject( $rows ) ) {
302 if ( ! isset( $duplicate[$row->cur_namespace] ) ) {
303 $duplicate[$row->cur_namespace] = array();
305 $duplicate[$row->cur_namespace][] = $row->cur_title;
306 echo ( sprintf( " %-60s %3s %5s\n", $row->cur_title, $row->cur_namespace, $row->c ) );
308 $sql = "SELECT cur_title, cur_namespace, cur_id, cur_timestamp FROM $cur WHERE ";
310 foreach ( $duplicate as $ns => $titles ) {
316 $sql .= "( cur_namespace = {$ns} AND cur_title in (";
318 foreach ( $titles as $t ) {
320 $sql .= $wgDatabase->addQuotes( $t );
323 $sql .= ', ' . $wgDatabase->addQuotes( $t );
328 # By sorting descending, the most recent entry will be the first in the list.
329 # All following entries will be deleted by the next while-loop.
330 $sql .= 'ORDER BY cur_namespace, cur_title, cur_timestamp DESC';
332 $rows = $wgDatabase->query( $sql, $fname );
334 $prev_title = $prev_namespace = false;
337 while ( $row = $wgDatabase->fetchObject( $rows ) ) {
338 if ( $prev_title == $row->cur_title && $prev_namespace == $row->cur_namespace ) {
339 $deleteId[] = $row->cur_id;
341 $prev_title = $row->cur_title;
342 $prev_namespace = $row->cur_namespace;
344 $sql = "DELETE FROM $cur WHERE cur_id IN ( " . join( ',', $deleteId ) . ')';
345 $rows = $wgDatabase->query( $sql, $fname );
347 echo "......<b>Deleted</b> ".$wgDatabase->affectedRows()." records.\n";
352 echo "......Creating tables.\n";
353 $wgDatabase->query("CREATE TABLE $page (
354 page_id int(8) unsigned NOT NULL auto_increment,
355 page_namespace int NOT NULL,
356 page_title varchar(255) binary NOT NULL,
357 page_restrictions tinyblob NOT NULL default '',
358 page_counter bigint(20) unsigned NOT NULL default '0',
359 page_is_redirect tinyint(1) unsigned NOT NULL default '0',
360 page_is_new tinyint(1) unsigned NOT NULL default '0',
361 page_random real unsigned NOT NULL,
362 page_touched char(14) binary NOT NULL default '',
363 page_latest int(8) unsigned NOT NULL,
364 page_len int(8) unsigned NOT NULL,
366 PRIMARY KEY page_id (page_id),
367 UNIQUE INDEX name_title (page_namespace,page_title),
370 ) TYPE=InnoDB", $fname );
371 $wgDatabase->query("CREATE TABLE $revision (
372 rev_id int(8) unsigned NOT NULL auto_increment,
373 rev_page int(8) unsigned NOT NULL,
374 rev_comment tinyblob NOT NULL default '',
375 rev_user int(5) unsigned NOT NULL default '0',
376 rev_user_text varchar(255) binary NOT NULL default '',
377 rev_timestamp char(14) binary NOT NULL default '',
378 rev_minor_edit tinyint(1) unsigned NOT NULL default '0',
379 rev_deleted tinyint(1) unsigned NOT NULL default '0',
381 PRIMARY KEY rev_page_id (rev_page, rev_id),
382 UNIQUE INDEX rev_id (rev_id),
383 INDEX rev_timestamp (rev_timestamp),
384 INDEX page_timestamp (rev_page,rev_timestamp),
385 INDEX user_timestamp (rev_user,rev_timestamp),
386 INDEX usertext_timestamp (rev_user_text,rev_timestamp)
387 ) TYPE=InnoDB", $fname );
390 echo "......Locking tables.\n";
391 $wgDatabase->query( "LOCK TABLES $page WRITE, $revision WRITE, $old WRITE, $cur WRITE", $fname );
393 $maxold = intval( $wgDatabase->selectField( 'old', 'max(old_id)', '', $fname ) );
395 echo "......maxold is {$maxold}\n";
398 global $wgLegacySchemaConversion;
399 if( $wgLegacySchemaConversion ) {
400 // Create HistoryBlobCurStub entries.
401 // Text will be pulled from the leftover 'cur' table at runtime.
402 echo "......Moving metadata from cur; using blob references to text in cur table.\n";
403 $cur_text = "concat('O:18:\"historyblobcurstub\":1:{s:6:\"mCurId\";i:',cur_id,';}')";
404 $cur_flags = "'object'";
406 // Copy all cur text in immediately: this may take longer but avoids
407 // having to keep an extra table around.
408 echo "......Moving text from cur.\n";
409 $cur_text = 'cur_text';
412 $wgDatabase->query( "INSERT INTO $old (old_namespace, old_title, old_text, old_comment, old_user, old_user_text,
413 old_timestamp, old_minor_edit, old_flags)
414 SELECT cur_namespace, cur_title, $cur_text, cur_comment, cur_user, cur_user_text, cur_timestamp, cur_minor_edit, $cur_flags
415 FROM $cur", $fname );
418 echo "......Setting up revision table.\n";
419 $wgDatabase->query( "INSERT INTO $revision (rev_id, rev_page, rev_comment, rev_user, rev_user_text, rev_timestamp,
421 SELECT old_id, cur_id, old_comment, old_user, old_user_text,
422 old_timestamp, old_minor_edit
423 FROM $old,$cur WHERE old_namespace=cur_namespace AND old_title=cur_title", $fname );
426 echo "......Setting up page table.\n";
427 $wgDatabase->query( "INSERT INTO $page (page_id, page_namespace, page_title, page_restrictions, page_counter,
428 page_is_redirect, page_is_new, page_random, page_touched, page_latest, page_len)
429 SELECT cur_id, cur_namespace, cur_title, cur_restrictions, cur_counter, cur_is_redirect, cur_is_new,
430 cur_random, cur_touched, rev_id, LENGTH(cur_text)
432 WHERE cur_id=rev_page AND rev_timestamp=cur_timestamp AND rev_id > {$maxold}", $fname );
435 echo "......Unlocking tables.\n";
436 $wgDatabase->query( "UNLOCK TABLES", $fname );
439 echo "......Renaming old.\n";
440 $wgDatabase->query( "ALTER TABLE $old RENAME TO $text", $fname );
447 function do_inverse_timestamp() {
449 $fname="do_schema_restructuring";
450 if( $wgDatabase->fieldExists( 'revision', 'inverse_timestamp' ) ) {
451 echo "Removing revision.inverse_timestamp and fixing indexes... ";
452 dbsource( 'maintenance/archives/patch-inverse_timestamp.sql', $wgDatabase );
455 echo "revision timestamp indexes already up to 2005-03-13\n";
459 function do_text_id() {
461 if( $wgDatabase->fieldExists( 'revision', 'rev_text_id' ) ) {
462 echo "...rev_text_id already in place.\n";
464 echo "Adding rev_text_id field... ";
465 dbsource( 'maintenance/archives/patch-rev_text_id.sql', $wgDatabase );
470 function do_namespace_size() {
474 'recentchanges' => 'rc',
476 'querycache' => 'qc',
479 foreach( $tables as $table => $prefix ) {
480 do_namespace_size_on( $table, $prefix );
485 function do_namespace_size_on( $table, $prefix ) {
486 global $wgDatabase, $wgDBtype;
487 if ($wgDBtype != 'mysql')
489 $field = $prefix . '_namespace';
491 $tablename = $wgDatabase->tableName( $table );
492 $result = $wgDatabase->query( "SHOW COLUMNS FROM $tablename LIKE '$field'" );
493 $info = $wgDatabase->fetchObject( $result );
494 $wgDatabase->freeResult( $result );
496 if( substr( $info->Type, 0, 3 ) == 'int' ) {
497 echo "...$field is already a full int ($info->Type).\n";
499 echo "Promoting $field from $info->Type to int... ";
501 $sql = "ALTER TABLE $tablename MODIFY $field int NOT NULL";
502 $wgDatabase->query( $sql );
508 function do_pagelinks_update() {
510 if( $wgDatabase->tableExists( 'pagelinks' ) ) {
511 echo "...already have pagelinks table.\n";
513 echo "Converting links and brokenlinks tables to pagelinks... ";
514 dbsource( "maintenance/archives/patch-pagelinks.sql", $wgDatabase );
518 global $wgCanonicalNamespaceNames;
519 foreach( $wgCanonicalNamespaceNames as $ns => $name ) {
521 do_pagelinks_namespace( $ns );
527 function do_pagelinks_namespace( $namespace ) {
528 global $wgDatabase, $wgContLang;
530 $ns = intval( $namespace );
531 echo "Cleaning up broken links for namespace $ns... ";
533 $pagelinks = $wgDatabase->tableName( 'pagelinks' );
534 $name = $wgContLang->getNsText( $ns );
535 $prefix = $wgDatabase->strencode( $name );
536 $likeprefix = str_replace( '_', '\\_', $prefix);
538 $sql = "UPDATE $pagelinks
539 SET pl_namespace=$ns,
540 pl_title=TRIM(LEADING '$prefix:' FROM pl_title)
542 AND pl_title LIKE '$likeprefix:%'";
544 $wgDatabase->query( $sql, 'do_pagelinks_namespace' );
548 function do_drop_img_type() {
551 if( $wgDatabase->fieldExists( 'image', 'img_type' ) ) {
552 echo "Dropping unused img_type field in image table... ";
553 dbsource( "maintenance/archives/patch-drop_img_type.sql", $wgDatabase );
556 echo "No img_type field in image table; Good.\n";
560 function do_old_links_update() {
562 if( $wgDatabase->tableExists( 'pagelinks' ) ) {
563 echo "Already have pagelinks; skipping old links table updates.\n";
565 convertLinks(); flush();
569 function do_user_unique_update() {
571 $duper = new UserDupes( $wgDatabase );
572 if( $duper->hasUniqueIndex() ) {
573 echo "Already have unique user_name index.\n";
575 if( !$duper->clearDupes() ) {
576 echo "WARNING: This next step will probably fail due to unfixed duplicates...\n";
578 echo "Adding unique index on user_name... ";
579 dbsource( 'maintenance/archives/patch-user_nameindex.sql', $wgDatabase );
584 function do_user_groups_update() {
585 $fname = 'do_user_groups_update';
588 if( $wgDatabase->tableExists( 'user_groups' ) ) {
589 echo "...user_groups table already exists.\n";
590 return do_user_groups_reformat();
593 echo "Adding user_groups table... ";
594 dbsource( 'maintenance/archives/patch-user_groups.sql', $wgDatabase );
597 if( !$wgDatabase->tableExists( 'user_rights' ) ) {
598 if( $wgDatabase->fieldExists( 'user', 'user_rights' ) ) {
599 echo "Upgrading from a 1.3 or older database? Breaking out user_rights for conversion...";
600 dbsource( 'maintenance/archives/patch-user_rights.sql', $wgDatabase );
603 echo "*** WARNING: couldn't locate user_rights table or field for upgrade.\n";
604 echo "*** You may need to manually configure some sysops by manipulating\n";
605 echo "*** the user_groups table.\n";
610 echo "Converting user_rights table to user_groups... ";
611 $result = $wgDatabase->select( 'user_rights',
612 array( 'ur_user', 'ur_rights' ),
613 array( "ur_rights != ''" ),
616 while( $row = $wgDatabase->fetchObject( $result ) ) {
617 $groups = array_unique(
619 explode( ',', $row->ur_rights ) ) );
621 foreach( $groups as $group ) {
622 $wgDatabase->insert( 'user_groups',
624 'ug_user' => $row->ur_user,
625 'ug_group' => $group ),
629 $wgDatabase->freeResult( $result );
633 function do_user_groups_reformat() {
634 # Check for bogus formats from previous 1.5 alpha code.
636 $info = $wgDatabase->fieldInfo( 'user_groups', 'ug_group' );
638 if( $info->type == 'int' ) {
639 $oldug = $wgDatabase->tableName( 'user_groups' );
640 $newug = $wgDatabase->tableName( 'user_groups_bogus' );
641 echo "user_groups is in bogus intermediate format. Renaming to $newug... ";
642 $wgDatabase->query( "ALTER TABLE $oldug RENAME TO $newug" );
645 echo "Re-adding fresh user_groups table... ";
646 dbsource( 'maintenance/archives/patch-user_groups.sql', $wgDatabase );
650 echo "*** WARNING: You will need to manually fix up user permissions in the user_groups\n";
651 echo "*** table. Old 1.5 alpha versions did some pretty funky stuff...\n";
654 echo "...user_groups is in current format.\n";
659 function do_watchlist_null() {
660 # Make sure wl_notificationtimestamp can be NULL,
661 # and update old broken items.
663 $info = $wgDatabase->fieldInfo( 'watchlist', 'wl_notificationtimestamp' );
665 if( $info->not_null ) {
666 echo "Making wl_notificationtimestamp nullable... ";
667 dbsource( 'maintenance/archives/patch-watchlist-null.sql', $wgDatabase );
670 echo "...wl_notificationtimestamp is already nullable.\n";
678 function do_page_random_update() {
681 echo "Setting page_random to a random value on rows where it equals 0...";
683 $page = $wgDatabase->tableName( 'page' );
684 $wgDatabase->query( "UPDATE $page SET page_random = RAND() WHERE page_random = 0", 'do_page_random_update' );
685 $rows = $wgDatabase->affectedRows();
687 echo "changed $rows rows\n";
690 function do_all_updates() {
691 global $wgNewTables, $wgNewFields, $wgRenamedTables;
694 foreach ( $wgRenamedTables as $tableRecord ) {
695 rename_table( $tableRecord[0], $tableRecord[1], $tableRecord[2] );
699 foreach ( $wgNewTables as $tableRecord ) {
700 add_table( $tableRecord[0], $tableRecord[1] );
705 foreach ( $wgNewFields as $fieldRecord ) {
706 add_field( $fieldRecord[0], $fieldRecord[1], $fieldRecord[2] );
710 # Do schema updates which require special handling
711 do_interwiki_update(); flush();
712 do_index_update(); flush();
713 do_old_links_update(); flush();
714 do_image_name_unique_update(); flush();
715 do_watchlist_update(); flush();
716 do_user_update(); flush();
717 ###### do_copy_newtalk_to_watchlist(); flush();
718 do_logging_encoding(); flush();
720 do_schema_restructuring(); flush();
721 do_inverse_timestamp(); flush();
722 do_text_id(); flush();
723 do_namespace_size(); flush();
725 do_pagelinks_update(); flush();
727 do_drop_img_type(); flush();
729 do_user_unique_update(); flush();
730 do_user_groups_update(); flush();
732 do_watchlist_null(); flush();
734 //do_image_index_update(); flush();
736 do_logging_timestamp_index(); flush();
738 do_page_random_update(); flush();
740 initialiseMessages(); flush();
743 function archive($name) {
747 return "maintenance/oracle/archives/$name";
749 return "maintenance/archives/$name";