Search code examples
postgresqlsymfonypropel

PropelBundle database:create for postgres


I've installed propel bundle for symfony2. my database configuration is:

propel:
    dbal:
        driver:               pgsql
        user:                 postgres
        password:             postgres
        dsn:                  pgsql:host=localhost;port=5432;dbname=test_database
        options:              {}
        attributes:           {}

When i wan to create this database from console (console propel: database:create) i have got strange error : Unable to open PDO connection [wrapped: SQLSTATE[08006] [7] FATAL: database "pgsql" does not exist.

i created pgsql database on my localhost and everything was good. Database "test_database" was succesfull created. Can somebody explain me why i got this previous error? On mysql i've created database without any problems.


Solution

  • This issue was a bug in the PropelBundle, it has been fixed by the following commit (even if the commit message is about MySQL, it fixes other RDBMS): https://github.com/propelorm/PropelBundle/commit/b4475d27fb1eb846d10cc2d2e2bd164f037508e3