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: https://docs.phalcon.io/en/1.2.0/reference/models.html#models-meta-data. For the interface method it provides please read https://test.phalconphp.ru/class-Phalcon.Mvc.Model.MetaData.html