We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Generate ORM model from existing database?


I am considering porting a new client's website to Phalcon. The current site is poorly coded and extremely insecure, but the database is reusable, so I intend to reuse the database exactly as is, and just port the shoddy, insecure PHP app layer to Phalcon.

Can Phalcon's ORM generate a model from an existing database? Phalcon's docs only talk about creating brand new models, unless I missed a part where it explains creating models from existing db's.



Hi, quiet easy, use phalcon-devtools: https://github.com/phalcon/phalcon-devtools ~$ phalcon project my_project ~$ cd my-project ~$ phalcon all-models last command will generate all models for you