I am new to Symfony+Doctrine, but fairly experienced with web application development in general (mostly using Zend Framework). I have started a new project using Symfony, and I’m loving it.
I’ve got a handful of fixtures in my /data/fixtures/ folder which get loaded whenever I update the schema and do a:
sf doctrine:build --all --and-load
The problem is, adding fixtures is really tedious, whereas my app interface is pretty quick to load data with. So, I load testing data into the database (using my app), but then whenever I make a change to the schema (and run the above statement), it reverts the data to just what’s in the fixtures.
In the manual I read that the –and-append option would not overwrite the data in the database. But, the –all option says it resets the database.
Obviously if I delete a column from the schema then I would lose that information, but I just want to preserve my new records.
Sorry if I’m missing something very obvious. Thanks in advance for any help you can provide!
Use
symfony doctrine:build --all-classesFrom the documentation (
symfony help doctrine:build):