是否可以在不删除数据库的情况下加载doctrine fixture

use*_*660 19 php fixtures symfony doctrine-orm

我已经定义了一些fixturesdoctrine.

当我尝试使用此运行

php app/console doctrine:fixtures:load 然后它要求我清除数据库.

是否可以在不清除数据库的情况下加载它.

我remeber Django已经fixtures可以在单独的表中被加载,而不需要清洁现有的数据库

Phi*_*hil 40

使用该--append选项

php app/console help doctrine:fixtures:load
Usage:
 doctrine:fixtures:load [--fixtures[="..."]] [--append] [--em="..."] [--purge-with-truncate]

Options:
 --fixtures             The directory or file to load data fixtures from. (multiple values allowed)
 --append               Append the data fixtures instead of deleting all data from the database first.
 --em                   The entity manager to use for this command.
 --purge-with-truncate  Purge data by using a database-level TRUNCATE statement
Run Code Online (Sandbox Code Playgroud)