protected function renameTable($old, $new) { if ($this->db->tableExists($old)) { $this->output("Renaming table {$old} to {$new}\n"); $old = $this->db->realTableName($old, "quoted"); $new = $this->db->realTableName($new, "quoted"); $this->db->query("ALTER TABLE {$old} RENAME TO {$new}"); } }
protected function renameTable( $old, $new, $patch = false ) { if ( $this->db->tableExists( $old ) ) { $this->output( "Renaming table $old to $new\n" ); $old = $this->db->realTableName( $old, "quoted" ); $new = $this->db->realTableName( $new, "quoted" ); $this->db->query( "ALTER TABLE $old RENAME TO $new" ); if ( $patch !== false ) { $this->applyPatch( $patch ); } } }