我已经定义了一些fixtures
在doctrine
。
当我尝试运行使用此
php app/console doctrine:fixtures:load
然后它要求我清除数据库。
是否可以在不清除数据库的情况下加载它。
我remeberDjango
已fixtures
可在单独的表加载,而不需要清洁现有的数据库
使用--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
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句