我正在使用MySql使用Symfony2和Doctrine ORM.
创建实体后,我无法创建表.它引发了一个例外.
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[="..."]]
Run Code Online (Sandbox Code Playgroud)
我试图放弃它,但仍然会抛出错误.
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.
Run Code Online (Sandbox Code Playgroud)
数据库中没有表.清除了symfony和doctrine的所有缓存,但仍然是错误抛出.
Symfony2版本是2.0.1.