Kỳ Tóc Đỏ
Kỳ Tóc Đỏ

Reputation: 51

How to delete Entity is generated from generate:doctrine:entity

I create an Entity by using commandline php app/console generate:doctrine:entity. Now I want to delete that Entity(yml, schema..). I delete Doctrine yml file and Entity directory but when I use command line doctrine:schemal:create that always create Table which name = that Entity in Database?

Upvotes: 3

Views: 2839

Answers (2)

debugall
debugall

Reputation: 310

after removing the entity and clearing the cache try this command : doctrine:schema:update --force --complete

Upvotes: 4

Praveesh
Praveesh

Reputation: 1327

To delete a generated entity, please delete the yml that contains the schema, which is located in BundleName/Resources/config/doctrine/entityName.orm.yml file. Then, delete the entityName.php in BundleName/Entities/ and clear the cache using

php app/console cache:clear

Upvotes: 5

Related Questions