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 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区
  • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示