Skip to content

Instantly share code, notes, and snippets.

@makinuk
Last active August 21, 2016 16:22
Show Gist options
  • Save makinuk/2e7e6d39799988379b0a36b3f37bd511 to your computer and use it in GitHub Desktop.
Save makinuk/2e7e6d39799988379b0a36b3f37bd511 to your computer and use it in GitHub Desktop.

Create Entities from exist database

  • for all tables
php bin/console doctrine:mapping:import EntityBundle yml --force
php bin/console doctrine:generate:entities EntityBundle
  • for one table
php bin/console doctrine:mapping:import EntityBundle yml --force --filter=TableName
php bin/console doctrine:generate:entities EntityBundle:CusFileshare  --path=src

Create New Entity

php app/console generate:doctrine:entity --entity=AcmeBlogBundle:Post

Create Tables from Entities

php bin/console doctrine:schema:update --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment