doctrine / data-fixtures

Doctrine2 ORM Data Fixtures Extensions
http://www.doctrine-project.org
MIT License
2.78k stars 224 forks source link

Changed the MongoDBPurger class to only clear collections #188

Closed lavoiesl closed 9 years ago

lavoiesl commented 9 years ago

Changed the MongoDBPurger class to only clear collections, not remove them.

Instead of dropping all collections, we should remove all documents in a collection instead. This avoids problems where indexes are lost while dropping the collection, and collections not being recreated (with a schema create tool) while loading fixtures.

Fixes #150 Superseeds #118 from @gerryvdm

lavoiesl commented 9 years ago

I would like to add tests, but nothing is in place to test a Mongo database, so this may take time.

jwage commented 9 years ago

:+1:

lavoiesl commented 9 years ago

Merged to 1.1