Migrating functions

Does anybody know how can I migrate sql functions? For tables I saw there is createTable method.Thanks


Yii::app()->db->createCommand($yourSQL)->execute();

Because of PDO issue it should be:


Yii::app()->db->connection->pdoInstance->exec($sql);

mbi’s variant will execute only first statement and skip the rest.