Created
November 6, 2012 10:34
-
-
Save serapheem/4023932 to your computer and use it in GitHub Desktop.
Symfony2 - Common doctrine console commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create the database: | |
php app/console doctrine:database:create | |
Create the entity: | |
php app/console doctrine:generate:entity --entity="AcmeStoreBundle:Product" --fields="name:string(255) price:float description:text" | |
Update the entities: | |
php app/console doctrine:generate:entities Acme/StoreBundle/Entity/Product | |
php app/console doctrine:generate:entities AcmeStoreBundle | |
php app/console doctrine:generate:entities Acme | |
Update database based on entities: | |
php app/console doctrine:schema:update --force | |
Update entities based on database: | |
php app/console doctrine:mapping:import TestNewsBundle annotation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment