array( 'add_field', 'user_newtalk', 'user_last_timestamp', 'patch-user_last_timestamp.sql'),
array( 'do_populate_parent_id' ),
array( 'check_bin', 'protected_titles', 'pt_title', 'patch-pt_title-encoding.sql', ),
+ array( 'maybe_do_profiling_memory_update' ),
);
}
}
+function maybe_do_profiling_memory_update() {
+ global $wgDatabase;
+ if ( !$wgDatabase->tableExists( 'profiling' ) ) {
+ // Simply ignore
+ } elseif ( $wgDatabase->fieldExists( 'profiling', 'pf_memory' ) ) {
+ echo "profiling table has pf_memory field.\n";
+ } else {
+ echo "Adding pf_memory field to table profiling...";
+ dbsource( archive( 'patch-profiling-memory.sql' ), $wgDatabase );
+ echo "ok\n";
+ }
+}
+
function do_stats_init() {
// Sometimes site_stats table is not properly populated.
global $wgDatabase;