Graviton
Graviton

Reputation: 83294

Export MySQL Workbench data model directly to Schema YML in Propel/ Symfony

Is there any plugin that directly exports MYSQL Workbench data model directly to YML for Propel consumption?

Upvotes: 9

Views: 12700

Answers (4)

Ludek Vodicka
Ludek Vodicka

Reputation: 1730

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.

http://www.skipper18.com

Upvotes: 0

Aaron Belchamber
Aaron Belchamber

Reputation: 1698

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!

Upvotes: 2

mppfiles
mppfiles

Reputation: 2417

When using symfony 1.x, personally I prefer the following process:

  1. design the model with workbench
  2. use the "synchronize model" option to apply changes to the DB
  3. run the propel:build-schema task to update the schema.yml
  4. 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.

Upvotes: 0

MySQL Workbench
MySQL Workbench

Reputation:

Yes, MySQL Workbench Plugins are available for generating schemas for Propel, Doctrine, Symfony, etc

http://forums.mysql.com/read.php?153,208229

Upvotes: 10

Related Questions