Development

#9152 ([PATCH] php symfony doctrine:build-schema failure with PostgreSQL for 1.4.7 and 1.4.8 version)

You must first sign up to be able to contribute.

Ticket #9152 (new defect)

Opened 4 years ago

Last modified 4 years ago

[PATCH] php symfony doctrine:build-schema failure with PostgreSQL for 1.4.7 and 1.4.8 version

Reported by: gratiert Assigned to: fabien
Priority: minor Milestone: 1.4.11
Component: generator Version: 1.4.8
Keywords: Cc: Jonathan.Wage
Qualification: Unreviewed

Description

No possibility to generate the schema when using PostgreSQL with (before, I do normal generate:project and configure:database)

php symfony doctrine:build-schema

Tests done on 3 computers and I'm not the only one to get this issue e.g. http://comments.gmane.org/gmane.comp.db.postgresql.french/4214

Because of this, I choose the old 1.4.6 version and it works fine.

For the detail report, see attached file.

Attachments

error.txt (3.3 kB) - added by gratiert on 10/11/10 15:03:12.
Error_postgresql_build_schema
trac_9152_patch_for_Pgsql.php.patch (5.0 kB) - added by christian_vogel on 11/06/10 10:46:54.
Pgsql.php (14.4 kB) - added by branislav.durina@gmail.com on 01/28/11 01:29:22.
correction (Pgsql.php) for correct reading of table structure

Change History

10/11/10 15:03:12 changed by gratiert

  • attachment error.txt added.

Error_postgresql_build_schema

10/11/10 19:58:37 changed by Kris.Wallsmith

  • milestone set to 1.4.9.

Does your application include multiple databases? If so, this may be related to #9092.

10/12/10 10:25:43 changed by gratiert

No, I only use one database with the default schema (public) and my bd connection user is a postgres superuser.

10/26/10 14:19:18 changed by fabien

duplicates I have closed: #9156 #9170

10/28/10 01:42:33 changed by JehutyZeroshift

This is exactly the same error that I have encountered in symfony 1.4.7 and 1.4.8. I'm a superuser too in my PostgreSQL db but I can't build the schema from my db using "php symfony doctrine:build-schema".

11/06/10 10:31:57 changed by christian_vogel

Hi,

I want to propose a Patch for the Doctrine/Import/Pgsql.php

As far as I understood the broken Select-Statement "listTableColumns" is meant to load all columns of a given table. I transformed the query to a LEFT JOIN instead using subselects in the primary selected field list.

The Alias-Column 'pri' in the primary select should be 't' if its a primary key column or NULL. The Alias-Column 'typtype' in the primary select should be the pg_type.typtype, because it is the information about the general type of the column (base, row, enum, pseudo).

It's my first attempt to propose a patch, hope it helps.

11/06/10 10:46:54 changed by christian_vogel

  • attachment trac_9152_patch_for_Pgsql.php.patch added.

11/06/10 10:53:34 changed by christian_vogel

  • summary changed from php symfony doctrine:build-schema failure with PostgreSQL for 1.4.7 and 1.4.8 version to [PATCH] php symfony doctrine:build-schema failure with PostgreSQL for 1.4.7 and 1.4.8 version.

11/06/10 16:43:36 changed by Kris.Wallsmith

  • cc set to Jonathan.Wage.

It looks like this is an issue in Doctrine. Would you mind reposting this issue to the Doctrine tracker? http://www.doctrine-project.org/jira

Thanks, Kris

11/07/10 10:57:00 changed by christian_vogel

I opened a ticket at the doctrine project http://www.doctrine-project.org/jira/browse/DC-919

It seems to me the issue is already fixed in the current 1.2 branch. I asked for a confirmation. The issue can now be continued at the doctrine project.

01/28/11 01:29:22 changed by branislav.durina@gmail.com

  • attachment Pgsql.php added.

correction (Pgsql.php) for correct reading of table structure