我想将表格从 此外我猜测,更改注释就足够了: p>
但是在运行时 p>
它尝试再次创建表: p>
我还需要更改其他文件吗? p>
div> order code>更改为
shop_order code> 。 首先,我改变了phpmyadmin中的表名。 p>
/ * *
*订单
*
* @ORM \ Table(name =“shop_order”)
* @ORM \ Entity
* /
class订单{...
code> pre>
php bin / console doctrine:schema:update --dump-sql
code> pre>
CREATE TABLE`order`(id INT AUTO_INCREMENT NOT NULL ...
code> pre >
I want to change a table from order
to shop_order
. First I alter the table name in phpmyadmin.
Furthermore I would have guessed, that changing the annotations would be sufficient:
/**
* Order
*
* @ORM\Table(name="shop_order")
* @ORM\Entity
*/
class Order { ...
But when running
php bin/console doctrine:schema:update --dump-sql
It tries to create the table again:
CREATE TABLE `order` (id INT AUTO_INCREMENT NOT NULL ...
Is there any other file I need to change?