Пример #1
0
 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}");
     }
 }
Пример #2
0
	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 );
			}
		}
	}