2
votes

i ran

./symfony doctrine:build --all --and-load --no-confirmation

with the example's schema.yml file and all the tables and model classes in symfony populated nicely. however when i changed that schema.yml file completely by deleting all the example tables and rewrote my own, the database didn't delete the old changes nor did it delete any of the model classes. it just added the new tables into the database.

how can i get doctrine to "forget" about the old schema.yml ?

2

2 Answers

12
votes

You need to run doctrine:clean-model-files to delete model classes that are not represented in project or plugin schema.yml files.

1
votes

.. the old data was stored in an example file under the same directory, project_root/config/doctrine/schema_example.yml

turns out doctrine imports every file, not just schema.yml. woops.