framework/db/Migration.php
public function renameColumn($table, $name, $newName)
    {
        $time = $this->beginCommand("rename column $name in table $table to $newName");
        $this->db->createCommand()->renameColumn($table, $name, $newName)->execute();
        $this->endCommand($time);
    }
public function renameColumn($table, $name, $newName)
    {
        $time = $this->beginCommand("rename column $name in table $table to $newName");
        $this->db->createCommand()->renameColumn($table, $name, $newName)->execute();
        $this->endCommand($time);
    }
public function renameColumn ( $ table , $ name , $ newName ) { $ time = $ this -> beginCommand ( "rename column $name in table $table to $newName" ) ; $ this -> db -> createCommand ( ) -> renameColumn ( $ table , $ name , $ newName ) -> execute ( ) ; $ this -> endCommand ( $ time ) ; }
Builds and executes a SQL statement for renaming a column.
@param string $table the table whose column is to be renamed. The name will be properly quoted by the method.
@param string $name the old name of the column. The name will be properly quoted by the method.
@param string $newName the new name of the column. The name will be properly quoted by the method.
Builds and executes a SQL statement for renaming a column .