Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to load doctrine fixtures without deleting database

Tags:

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

like image 710
user1994660 Avatar asked Mar 05 '14 02:03

user1994660


1 Answers

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 
like image 166
Phil Avatar answered Sep 27 '22 19:09

Phil