Doctrine Schema Create for just one Bundle Doctrine Schema Create for just one Bundle symfony symfony

Doctrine Schema Create for just one Bundle


When you create a new bundle, just use

app/console doctrine:schema:update

Since your schema exists already.


Sometimes using php app/console doctrine:schema:update --force doesn't resolve the problem, so you can simply comment other bundles from the AppKernel.php in $bundles and then use php app/console doctrine:schema:update --force again, it should work.

Don't forget to uncomment commented bundles.


If your bundles are mapped to different entity managers, you can (or must) use the argument "--em entity_manager_name" for the schema update command.

Example:

app/console doctrine:schema:update --em my_own_entity_manager_name