<?php
-
+/**
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+ /** */
function do_revision_updates() {
global $wgSoftwareRevision;
if ( $wgSoftwareRevision < 1001 ) {
} else {
echo "...ipblocks is up to date.\n";
}
-
+
}
dbsource( "maintenance/archives/patch-rc_type.sql" , $wgDatabase );
echo "ok\n";
}
+ if ( !$wgDatabase->fieldExists( "recentchanges", "rc_ip" ) ) {
+ echo "Adding rc_ip...";
+ dbsource( "maintenance/archives/patch-rc_ip.sql", $wgDatabase );
+ echo "ok\n";
+ }
+ if ( !$wgDatabase->fieldExists( "recentchanges", "rc_id" ) ) {
+ echo "Adding rc_id...";
+ dbsource( "maintenance/archives/patch-rc_id.sql", $wgDatabase );
+ echo "ok\n";
+ }
+ if ( !$wgDatabase->fieldExists( "recentchanges", "rc_patrolled" ) ) {
+ echo "Adding rc_patrolled...";
+ dbsource( "maintenance/archives/patch-rc-patrol.sql", $wgDatabase );
+ echo "ok\n";
+ }
}
function do_user_real_name_update() {
}
}
-?>
\ No newline at end of file
+function do_image_name_unique_update() {
+ global $wgDatabase;
+ if ( $wgDatabase->indexUnique( 'image', 'img_name' ) ) {
+ echo "...img_name already unique.\n";
+ } else {
+ echo "Making the img_name index unique... ";
+ dbsource( "maintenance/archives/patch-image_name_unique.sql", $wgDatabase );
+ echo "ok\n";
+ }
+}
+
+function do_logging_update() {
+ global $wgDatabase;
+ if ( $wgDatabase->tableExists( 'logging' ) ) {
+ echo "...logging table already exists.\n";
+ } else {
+ echo "Creating logging table and adjusting recentchanges... ";
+ dbsource( "maintenance/archives/patch-logging.sql", $wgDatabase );
+ echo "ok\n";
+ }
+}
+
+function do_user_rights_update() {
+ global $wgDatabase;
+ if ( $wgDatabase->tableExists( 'user_rights' ) ) {
+ echo "...user_rights table already exists.\n";
+ } else {
+ echo 'Creating user rights table...';
+ dbsource( 'maintenance/archives/patch-user_rights.sql', $wgDatabase );
+ echo "ok\n";
+ }
+}
+
+?>