duanping2695 2014-03-05 02:42
浏览 52
已采纳

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

I have defined some fixtures in doctrine.

When i try to run using this

php app/console doctrine:fixtures:load then it asks me to purge the database.

is it possible to load it without purging database.

I remeber Django has fixtures which can be loaded in separate tables without purging existing database

  • 写回答

3条回答 默认 最新

  • dsfadsa08911 2014-03-05 02:47
    关注

    Use the --append option

    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
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办