Is there any plugin that directly exports MYSQL Workbench data model directly to YML for Propel consumption?
是否有任何插件直接将MYSQL Workbench数据模型直接导出到YML以进行Propel消费?
4 个解决方案
#1
10
Yes, MySQL Workbench Plugins are available for generating schemas for Propel, Doctrine, Symfony, etc
是的,MySQL Workbench插件可用于为Propel,Doctrine,Symfony等生成模式
#2
2
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.
只是这个问题的更新。如果您正在寻找一种快速方便的方法将数据库表导出到实体并映射.yml文件,那么曾经有一个Workbench的插件可以执行此操作,但不幸的是,不再支持此LUA。它运行得很好 - 太糟糕了,因为如果你使用MySQL Workbench,理想情况下,插件最方便,最快速的方式将数据库作为实体导出到Symfony项目中。
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:
因此,我发现的下一个最佳解决方案是安装一个可以从Symfony的应用程序/控制台执行的实用程序,名为“mysqlworkbenchschemaexporter”。使用此实用程序,您必须保存Workbench文件(* .wmb),然后将它们上载到文件夹,然后可以使用以下app / console命令:
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:
如果没有购买价格超过300美元的Skipper等ORM工具,我确实找到了最近更新的解决方案,该解决方案支持:
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!
我希望这有助于其他Symfony开发人员节省一些实体创建和ORM映射的时间!
#3
0
When using symfony 1.x, personally I prefer the following process:
使用symfony 1.x时,我个人更喜欢以下过程:
- 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)
用工作台设计模型
使用“同步模型”选项将更改应用于数据库
运行propel:build-schema任务来更新schema.yml
运行propel:build --all-classes任务(它意味着模型,表单和过滤器)
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.
请注意:第3步将覆盖整个schema.yml文件。如果你需要添加特殊的调整,只需将schema.custom.yml添加到你的项目中,你就可以了。
#4
0
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.
如果从MySQL工作台导出是不够的,您可以尝试我们的工具Skipper - 以前的ORM Designer(我是首席开发人员)。使用Skipper,您还可以定义和导出行为,Propel特定列/表/ ...属性等等。
#1
10
Yes, MySQL Workbench Plugins are available for generating schemas for Propel, Doctrine, Symfony, etc
是的,MySQL Workbench插件可用于为Propel,Doctrine,Symfony等生成模式
#2
2
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.
只是这个问题的更新。如果您正在寻找一种快速方便的方法将数据库表导出到实体并映射.yml文件,那么曾经有一个Workbench的插件可以执行此操作,但不幸的是,不再支持此LUA。它运行得很好 - 太糟糕了,因为如果你使用MySQL Workbench,理想情况下,插件最方便,最快速的方式将数据库作为实体导出到Symfony项目中。
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:
因此,我发现的下一个最佳解决方案是安装一个可以从Symfony的应用程序/控制台执行的实用程序,名为“mysqlworkbenchschemaexporter”。使用此实用程序,您必须保存Workbench文件(* .wmb),然后将它们上载到文件夹,然后可以使用以下app / console命令:
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:
如果没有购买价格超过300美元的Skipper等ORM工具,我确实找到了最近更新的解决方案,该解决方案支持:
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!
我希望这有助于其他Symfony开发人员节省一些实体创建和ORM映射的时间!
#3
0
When using symfony 1.x, personally I prefer the following process:
使用symfony 1.x时,我个人更喜欢以下过程:
- 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)
用工作台设计模型
使用“同步模型”选项将更改应用于数据库
运行propel:build-schema任务来更新schema.yml
运行propel:build --all-classes任务(它意味着模型,表单和过滤器)
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.
请注意:第3步将覆盖整个schema.yml文件。如果你需要添加特殊的调整,只需将schema.custom.yml添加到你的项目中,你就可以了。
#4
0
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.
如果从MySQL工作台导出是不够的,您可以尝试我们的工具Skipper - 以前的ORM Designer(我是首席开发人员)。使用Skipper,您还可以定义和导出行为,Propel特定列/表/ ...属性等等。