We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

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: 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