tags:

views:

29

answers:

2

Let's say I want to download a Symfony's complete app, for instance, Jobbet

I'll have everything necessary to run the app in my desktop but it wouldn't really work with an empty database. Is there a terminal command to create and fill the database with everything that the app requires?

+1  A: 

You can either edit config/databases.yml file or use configure:database task. For more info run:

./symfony help configure:database
kuba
After that, he also needs to build the models/forms/filters, create the tables and insert any fixtures. To do that, execute `php symfony propel:build-all-load` or it's doctrine equivalent.
Maerlyn
+2  A: 

First, configure your database, either by command line, or editing the "/config/databases.yml" file.

> php symfony configure:database "mysql:host=YOURHOST;dbname=YOURDBNAME" YOURDBUSER YOURDBPASS

Next, if you want to generate everything, forms, filters, models and data, run the following command:

For Doctrine ORM:

php symfony doctrine:build --all --and-load

For Propel ORM:

php symfony propel:build --all --and-load

This should get you up and running. You should definitely look at the tutorial for Jobeet posted on the Symfony Project website for more information on how this project works:

Doctrine: http://www.symfony-project.org/jobeet/1_4/Doctrine/en/

Propel: http://www.symfony-project.org/jobeet/1_4/Propel/en/

Jon