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?