Symfony 实体覆盖“名称为 'sulu_11.me_media' 的 table 已经存在

Symfony entity override "The table with name 'sulu_11.me_media' already exists

我正在覆盖包的实体。

在我的包里

我正在写一个

namespace AppBundle\Entity;

use Sulu\Bundle\MediaBundle\Entity\Media as Base;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
 * @ORM\Table(name="me_media")
 * @ORM\Entity(repositoryClass="AppBundle\Repository\MediaRepository")
 */
class Media extends Base
{

}

当我 运行 命令

php bin/console doctrine:schema:update --force

Error thrown while running command "doctrine:schema:update --force". Message: "The table with name 'sulu_11.me_media' already exists." ["error" => Doctrine\DBAL\Schema\SchemaException { …},"command" => "doctrine:schema:update --force","message" => "The table with name 'sulu_11.me_media' already exists."] [] [Doctrine\DBAL\Schema\SchemaException] The table with name 'sulu_11.me_media' already exists.

您是否也添加了新实体的配置?您可以在文档 http://docs.sulu.io/en/latest/cookbook/extend-entities.html#configuration

中找到