How to Preserve Data in Specific Tables/Entities when using Doctrine2 Fixtures?
I have three tables/entities for which I want to preserve their data when I load Doctrine2 fixtures. Of course, right now, when I run doctrine:fixtures:load
, it purges the entire database (except migration_versions) and then loads the fixtures appropriately.
I realize that I can use the --append switch to only add data to the database, but I do want to remove most of the data from the database.
How do I preserve table data from 开发者_JAVA技巧only three tables/entities when using Doctrine2 fixtures?
How about you separate the "append-only" and "delete-only" fixtures classes into separate folders and then run two console commands specifying the fixtures path using --fixtures ?
精彩评论