php – 可以加载doctrine灯具而不删除数据库

前端之家收集整理的这篇文章主要介绍了php – 可以加载doctrine灯具而不删除数据库前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我已经在教义中定义了一些装置.

当我尝试使用这个运行

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

是否可以加载它而不需要清除数据库.

我记得Django具有可以单独加载的灯具,而不需要清除现有的数据库

使用–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
原文链接:https://www.f2er.com/php/140019.html

猜你在找的PHP相关文章