hugopereira84
11/26/2015 - 12:58 PM

Tips symfony cli

Tips symfony cli

You now have a usable Product class with mapping information so that Doctrine 
knows exactly how to persist it. Of course, you don't yet have the 
corresponding product table in your database. Fortunately, Doctrine can 
automatically create all the database tables needed for every known entity 
in your application. To do this, run:
php app/console doctrine:schema:update --force




Create tables in db:
php app/console doctrine:schema:update --force
Check if database is already in sync with the current entity metadata:
php app/console doctrine:schema:update --dump-sql
Once the metadata files are generated, you can ask Doctrine to build related entity classes by executing the following two commands:
php app/console doctrine:generate:entities CoreUserBundle