Is there any plugin that directly exports MYSQL Workbench data model directly to YML for Propel consumption?
4 Answers
Yes, MySQL Workbench Plugins are available for generating schemas for Propel, Doctrine, Symfony, etc
-
Thanks, I didn't realize that the plugin for Propel and Symfony, as far as MySQL workbench is concenred, are different when I did google searches for this. This is my fault, and hence I change the question of this title so that other people who are in my same shoe can benefit from this – Graviton Mar 02 '09 at 02:23
Just an update on this issue. If you are looking for a quick and convenient way to export your database tables to entities and mapping .yml files, there used to be a plugin for Workbench that would do this, but this LUA is not supported any more, unfortunately. It worked great -- too bad because if you use MySQL Workbench, a plugin would ideally be the most convenient and fastest way to export your database as entities into your Symfony project.
So, the next best solution I found is installing a utility that can be executed from Symfony's app/console called "mysqlworkbenchschemaexporter
". With this utility, you will have to save your Workbench files (*.wmb) then upload them to a folder, then the following app/console commands are available:
app/console mysqlworkbenchschemaexporter:dump
app/console mysqlworkbenchschemaexporter:withRepository
Without buying an ORM tool like Skipper, which costs over $300, I did find this recently updated solution that is supported at:
https://github.com/turnaev/mysql-workbench-schema-exporter-symfony2-bundle
I hope this helps other Symfony developers save some time with entity creation and ORM mappings!

- 81,782
- 146
- 424
- 602

- 1,480
- 1
- 16
- 20
When using symfony 1.x, personally I prefer the following process:
- design the model with workbench
- use the "synchronize model" option to apply changes to the DB
- run the propel:build-schema task to update the schema.yml
- run the propel:build --all-classes task (it implies model, forms and filters)
Please note: step 3 will overwrite your entire schema.yml file. If you need to add special tweaks to it, just add a schema.custom.yml to your project and you're good to go.

- 2,397
- 1
- 21
- 16
If export from MySQL workbench isn't sufficient, you can try our tool Skipper - formerly ORM Designer (I'm chief developer). With Skipper you can define and export also behaviours, Propel specific column/table/... attributes and much more.

- 1,610
- 1
- 18
- 33
-
I am a fan of Skipper, it helped with my Symfony ORM mappings, definitely saves time for devs, especially on bigger projects. – Aaron Belchamber Jun 16 '17 at 15:53