MySQL Workbench Propel export plugin
So I wrote about converting MySQL Workbench files to Propel schema files.
Now I have a much improved solution: A plugin for MySQL Workbench that allows you to export your current catalog as Propel schema file.
Like the XSL I wrote, it supports the same features:
- Columns with:
- Default values
- Auto-increment attribute
- Size
- Description
- Required-attribute
- Primary-key attribute
- normal extra keys
- unique keys
- foreign keys
Currently it creates propel 1.2 compatible files, but I plan to publish an update once propel 1.3 is available as rc.
The plugin allows you to export the propel-schema to the clipboard so that you can paste it everywhere you want, or you may export it to a file. Unfortunatly MySQL Workbench does not yet have a way for plugins to show a “file save as”-dialog, so you have to type the path in manually. I hope the MySQL guys implement a file selector in the next version, as it should be doable quite easily. If that becomes available, I will update the plugin accordingly.
The neat thing is, that the export path is saved inside the Workbench file, so on subsequent exports you have the possibility to overwrite the last file right away without entering a path again.
The plugin certainly contains bugs and shortcomings, but I think it is a good start. If you have a case where the plugin does not export your file correctly, please send me the workbench file and explain what gets exported wrong, and I will hopefully be able to provide a fix for it.
And if you are a lua-monkey then dont hesitate to point me to ways to improve the code of the plugin. This is was my first time experience with lua and as such it may very well be not perfect.
So, without further ado, here is the MySQL Workbench Propel-Export Plugin v0.3.
How to Install:
Copy the file to your modules-folder inside the Workbench installation. This should work in all versions of Windows prior to Vista.
On Vista this may not work due to the automatic directory-redirection. In that case place the file into that folder: C:\Users\<username>\AppData\Roaming\MySQL\Workbench\modules\ and it should work perfectly.
After you placed the file into the directory, simple restart MySQL Workbench and the plugin should show up in the Plugins -> Catalog menu. The two entries from the plugin are prefixed with “PropelExport:” so you should be able to find them easily.
Thats it! Now go ahaed and test the plugin, and report how it works through the comments section! Thanks!



Mmmh. Sounds good. I think i will try the Workbench in the next few Days and also try your plug in. At the moment i still use the old DBDesigner and the XSL for DBD to Propel Transformation.