8816f9433103cacdeadcbcbc0644ca8f01a49370
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" );
16 $wgTitle = Title
::newFromText( "MediaWiki database updater" );
18 echo( "MediaWiki {$wgVersion} Updater\n\n" );
20 install_version_checks();
22 # Attempt to connect to the database as a privileged user
23 # This will vomit up an error if there are permissions problems
24 $wgDatabase = wfGetDB( DB_MASTER
);
26 print "Going to run database updates for ".wfWikiID()."\n";
27 print "Depending on the size of your database this may take a while!\n";
29 if( !isset( $options['quick'] ) ) {
30 print "Abort with control-c in the next five seconds... ";
34 $shared = isset( $options['doshared'] );
35 $purge = !isset( $options['nopurge'] );
37 do_all_updates( $shared, $purge );