如何向退出表symfony添加新列-Orocommerce

时间:2018-11-12 15:36:40

标签: symfony orocommerce

我正在做一个 orocommerce 项目,它使用了vendor / oro / bundles / bundle_name
并且在该捆绑包中,它有一个名为“ oro_customer_user ”的实体,因此我想使用我的新捆绑包在该表中添加新列。
我搜索了很多东西,但还是没有运气。
几乎所有解决方案都说我需要修复供应商 / oro / bundles / bundle_name,这是我不想做的。
但是仍然有一些解决方案,说我需要使用 DoctrineMigrationsBundle ,但是对此我不确定。
https://symfony.com/doc/master/bundles/DoctrineMigrationsBundle/index.html

请提供建议,谢谢:)

1 个答案:

答案 0 :(得分:0)

好吧,所以我找到了 oorcommerce 的解决方案
只需使用迁移,一切都会好起来的
您可以检查以下链接:
https://forum.oroinc.com/orocrm/orocrm-programming-questions/topic/add-custom-field-into-orocrm-entity#post-24765
您必须创建手动迁移,因为我不知道如何通过命令行创建迁移:(。
创建迁移完成后,只需运行以下cmd:

php app/console oro:migration:load --show-queries

现在去检查数据库,它已经完成了。


关于实体:
我仍然不知道如何在在线商务中对其进行自定义。它有很多错误。