5 * This is used when the database schema is modified and we need to apply patches.
13 $wgUseMasterForMaintenance = true;
14 require( "commandLine.inc" );
15 require( "updaters.inc" );
17 # Don't try to load stuff from l10n_cache yet
18 $lc = Language
::getLocalisationCache();
19 $lc->disableBackend();
21 $wgTitle = Title
::newFromText( "MediaWiki database updater" );
23 echo( "MediaWiki {$wgVersion} Updater\n\n" );
25 install_version_checks();
27 # Attempt to connect to the database as a privileged user
28 # This will vomit up an error if there are permissions problems
29 $wgDatabase = wfGetDB( DB_MASTER
);
31 print "Going to run database updates for ".wfWikiID()."\n";
32 print "Depending on the size of your database this may take a while!\n";
34 if( !isset( $options['quick'] ) ) {
35 print "Abort with control-c in the next five seconds... ";
39 $shared = isset( $options['doshared'] );
40 $purge = !isset( $options['nopurge'] );
42 do_all_updates( $shared, $purge );