我已经执行了
bin / console d:s:u --force
然后成功创建了架构。但是,如果我再次执行此命令,Symfony想要重新创建架构。怎么会这样?
查看完整的命令行输出:
$ bin/console d:s:u --force
Updating database schema...
Database schema updated successfully!
"7" queries were executed
$ bin/console d:s:u --force
Updating database schema...
[Doctrine\DBAL\Exception\TableExistsException]
An exception occurred while executing 'CREATE TABLE message (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, subject VARCHAR(255) NOT NULL, text VARCHAR(255) NOT NULL, INDEX IDX_B6BD307FA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB':
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'message' already exists
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'message' already exists
[PDOException]
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'message' already exists
答案 0 :(得分:0)
我有这个配置选项,这导致了麻烦:
schema_filter:" / user_field_data /"