我使用Symfony2和Doctrine ORM使用MySql。
创建实体后,我无法创建表。它抛出异常。
anu@anu-bridge:/var/www/Symfony$ php app/console doctrine:schema:update --force --dump-sql
[Doctrine\DBAL\Schema\SchemaException]
The table with name 'product' already exists.
doctrine:schema:update [--complete] [--dump-sql] [--force] [--em[="..."]]
我试图删除它,但仍然会引发错误。
anu@anu-bridge:/var/www/Symfony$ php app/console doctrine:schema:drop --force
Dropping database schema...
[Doctrine\DBAL\Schema\SchemaException]
The table with name 'product' already exists.
doctrine:schema:drop [--dump-sql] [--force] [--full-database] [--em[="..."]]
[Doctrine\DBAL\Schema\SchemaException]
The table with name 'product' already exists.
数据库中没有表。清除symfony和doctrine的所有缓存,但仍然是错误抛出。
Symfony2版本是2.0.1。