-function rename_table( $from, $to, $patch ) {
- global $wgDatabase;
- if ( $wgDatabase->tableExists( $from ) ) {
- if ( $wgDatabase->tableExists( $to ) ) {
- wfOut( "...can't move table $from to $to, $to already exists.\n" );
- } else {
- wfOut( "Moving table $from to $to..." );
- $wgDatabase->sourceFile( archive( $patch ) );
- wfOut( "ok\n" );
- }
- } else {
- // Source table does not exist
- // Renames are done before creations, so this is typical for a new installation
- // Ignore silently
- }
-}
-