1
votes

I am using Sf 1.4 for a project. I want to switch from mySQL to PostgreSQL because of technical reasons (I have written some database extensions, which I need access to in my queries).

I have trawled the net, but can't seem to find any info on how to fo this. So far, I have modified my database.yml file by modifying the database.yml dsn entry as follows:

From:

dsn:        mysql:dbname=##PROJECT_NAME##;host=localhost

To:

dsn:        postgres:dbname=##PROJECT_NAME##;host=localhost

I have also commented out the mysql specific entries in propel.ini

However, when I run ./symfony propel:build-sql and checked the generated SQL, I notice that the SQL generated was MySQL dialect rather than PostgreSQL.

How do I tell Symfony to generate SQL for PostgreSQL?

1
If you found an answer then add it as answer and accept it. It might be helpful to other users :)Michal Trojanowski
@HomunculusReticulli Could you post your own answer or accept mine so that this question doesn't show up in the list of unanswered/unaccepted questions?NobleUplift

1 Answers

1
votes

Since the OP won't post his own answer and accept it...

The DSN for PostgreSQL must begin with pgsql:, not postgres:.