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