Friday, June 4, 2010

Symfony with PostgreSql

PostgreSql connection with symfony is bit tuffer then mysql db.
For that, you have to edit some of the file in your application directory....
Step 1: Edit config/database.yml

Step 2: Edit file config/propel.ini
here set....
propel.database = pgsql
propel.database.creatUrl = pgsql://user:password@server-ip/database-name
propel.database.url = pgsql://user:password@server-ip/database-name
Step 3: Edit file apps/frontend/config/setting.yml
here set...
use_database: on
orm: propel
Step 4: symfony cc
After that build your model that create sql and respected table classes. via..
1. symfony propel: build-model //create classes
2. symfony propel:build-sql // cretae .sql file
3. symfony propel:insert-sql //create table structure

No comments :