Doctrine ORM: drop all tables without dropping database
问题 I have to work with an existing database (not managed with Doctrine) and I want to use doctrine only for new tables in this db. is there a way to tell Doctrine to not drop the entire DB on reload but only the models defined in the yaml file ? 回答1: I know this a very old question, and it appears you are using symfony. Try: app/console --env=prod doctrine:schema:drop --full-database This will drop all the tables in the DB. 回答2: For Symfony 3: $entityManager = $container->get('doctrine.orm