protected function renameColumn($col, $name)
    {
        if (empty($col)) {
            return Yii::t('podium/flash', 'Installation aborted! Column name missing.');
        }
        if (empty($name)) {
            return Yii::t('podium/flash', 'Installation aborted! New column name missing.');
        }
        try {
            $this->db->createCommand()->renameColumn($this->table, $col, $name)->execute();
            return $this->returnSuccess(Yii::t('podium/flash', 'Table column {name} has been renamed to {new}', [
                'name' => $col,
                'new'  => $name
            ]));
        } catch (Exception $e) {
            return $this->returnError($e->getMessage(), __METHOD__,
                Yii::t('podium/flash', 'Error during table column {name} renaming to {new}', [
                    'name' => $col,
                    'new'  => $name
                ])
            );
        }
    }
protected function renameColumn($col, $name)
    {
        if (empty($col)) {
            return Yii::t('podium/flash', 'Installation aborted! Column name missing.');
        }
        if (empty($name)) {
            return Yii::t('podium/flash', 'Installation aborted! New column name missing.');
        }
        try {
            $this->db->createCommand()->renameColumn($this->table, $col, $name)->execute();
            return $this->returnSuccess(Yii::t('podium/flash', 'Table column {name} has been renamed to {new}', [
                'name' => $col,
                'new'  => $name
            ]));
        } catch (Exception $e) {
            return $this->returnError($e->getMessage(), __METHOD__,
                Yii::t('podium/flash', 'Error during table column {name} renaming to {new}', [
                    'name' => $col,
                    'new'  => $name
                ])
            );
        }
    }
protected function renameColumn ( $ col , $ name ) { if ( empty ( $ col ) ) { return Yii :: t ( 'podium/flash' , 'Installation aborted! Column name missing.' ) ; } if ( empty ( $ name ) ) { return Yii :: t ( 'podium/flash' , 'Installation aborted! New column name missing.' ) ; } try { $ this -> db -> createCommand ( ) -> renameColumn ( $ this -> table , $ col , $ name ) -> execute ( ) ; return $ this -> returnSuccess ( Yii :: t ( 'podium/flash' , 'Table column {name} has been renamed to {new}' , [ 'name' => $ col , 'new' => $ name ] ) ) ; } catch ( Exception $ e ) { return $ this -> returnError ( $ e -> getMessage ( ) , __METHOD__ , Yii :: t ( 'podium/flash' , 'Error during table column {name} renaming to {new}' , [ 'name' => $ col , 'new' => $ name ] ) ) ; } }
Renames database table column.
@param string $col column name
@param string $name column new name
@return string result message
Renames database table column .