How do I remove entities in Doctrine 2? I want to know how to do this through the command line and with PHP. Thanks!
Edit:
I’m not sure if I’m asking this question right (I’m new to Doctrine). I want to leave the Entity file in the directory, but I want to delete its table from the database. This stems from Zend based modular architecture where modules can be installed/uninstalled without the module directory being removed. If a module is uninstalled, I want its entities removed. The opposite is also true.
I did some looking into Doctrine’s API and eventually figured it out:
This will remove the tables associated with Entities\MyEntity1, 2, 3 and 4 from the database.
Also, using the exact same code above except the last line, the following methods are useful:
AND
You can find all the info in Doctrine’s documentation:
http://www.doctrine-project.org/projects/orm/2.0/api