i know i can run DQL and all the fancy ORM features using Doctrine. but for development, maybe i want to just initialize the database with defalt data.
say i want to do:
- truncate the database tables
initialize tables with default test data
i am thinking it will be good if i can just go to a page say
/initData
that truncates database and inserts test data. how can i do that?i think another way is to run
php doctrine.php orm:schema-tool:drop php doctrine.php orm:schema-tool:create
i think in doctrine 1 theres a build-all-reload
is there such a thing?
but i still think it will be good to know how to run normal SQL in doctrine. is there a way?