Generate sql

there is any solution to generate sql schema file from the model metadata, for example, if it described via annotations?

You can access the interface of \Phalcon\Mvc\Model\MetaData. For retreiving it, please read: http://docs.phalconphp.com/en/1.2.0/reference/models.html#models-meta-data. For the interface method it provides please read http://test.phalconphp.ru/class-Phalcon.Mvc.Model.MetaData.html