问题出在Sqlite上
当我运行bin/console doctrine:schema:update --force
时
DROP INDEX IDX_D6E3F8A6A76ED395;
CREATE TEMPORARY TABLE __temp__track AS SELECT id, user_id, data FROM track;
DROP TABLE track;
CREATE TABLE track (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, data CLOB NOT NULL COLLATE BINARY --(DC2Type:array)
, CONSTRAINT FK_D6E3F8A6A76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
INSERT INTO track (id, user_id, data) SELECT id, user_id, data FROM __temp__track;
DROP TABLE __temp__track;
CREATE INDEX IDX_D6E3F8A6A76ED395 ON track (user_id);
被执行,但是在该命令之后
bin/console doctrine:schema:update --force
执行相同的SQL,但实体相同。
导致此行为的原因。