ZF2 的 Doctrine Scheme 工具

Doctrine Scheme tool with ZF2

我正在尝试将 Doctrine Scheme 工具与 ZF2 一起使用,但没有成功,我正在尝试通过命令行更新我的 Mysql 数据库,但我不断收到此错误:

$ ./doctrine-module orm:schema-tool:create --dump-sql [Doctrine\DBAL\Schema\SchemaException] The table with name 'ondemand_server.rbu_roles' already exists.

rbu_roles 来自 ZfcRbac,我想它是在供应商模块和我自己的自定义模块中定义的,我该如何处理?有没有办法忽略某些实体等?

干杯!

检查你的实体注释,如果你做了一些 copy/paste,你可能有重复的 table 名称:

@ORM\Table(name="rbu_roles")