I’ve seen a plugin for MySQL Workbench for exporting schema’s in YAML format. But, it no longer appears to be supported.
I’ll be trying to Doctrine 2.0 and would be interested in any suggestions or best practices for writing the designing the YAML, DB, and Models.
From what I can tell so far, it seems that these are the available options:
-
Hand write YAML and use this to generate the Models. The models will then issue the appropriate create table scripts to build the MySQL tables.
-
Use an editor to build YAML files, continue as above.
-
Build the database (using WorkBench or by hand), then use
Doctrine_Core::generateModelsFromDb()to build the models. This I assume would remove the need for YAML?
Am I missing anything? Would love to hear any tips/feedback from those who have a lot more experience with ORM/Doctrine2.
Thank you!
ad 1. I try this, but I can’t imagine build bigger database with relations in YAML.
ad 2. Try http://www.orm-designer.com/. For small db is ok, but for bigger with many relations are problems.
ad 3.
Doctrine_Core::generateModelsFromDb()exists in Doctrine1. For Doctrine2 try console tools.I make a lot in Doctrine1, but new projects prepare in Doctrine2.
I lost some time looking better way to create entities, but nothing better founded, so I do: