Yii, Execute Mysql Code

i want to run this code to be executed on yii for mysql

alter table caracterizacion add variable boolean

i have tried this code


public function columna()

{

    $sql="alter table caracterizacion add variable boolean";

    $data=Yii::app()->db->createCommand($sql)->execute();

    return $data;   

}

i run thus function from the model on controller by doing:


$model=new Caracterizacion;

Caracterizacion::model()->columna();

its not being executed, can anyone tell me how to do this?

i fixed my problem by changing the position of the code being called, the problem was that another code this one was redirecting to some other place and did not let this code to be run