2

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 only three tables/entities when using Doctrine2 fixtures?

Stephen Watkins
  • 25,047
  • 15
  • 66
  • 100

1 Answers1

2

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 ?

Eno
  • 10,730
  • 18
  • 53
  • 86