Uploaded image for project: 'Doctrine 1'
  1. Doctrine 1
  2. DC-473

createIndexSql() and dropIndexSql() use different index names (formatter) on MySQL and Postgres

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: Import/Export
    • Labels:
      None
    • Environment:
      Postgres 8.3, MySQL 5.0

      Description

      While playing with createIndexSql() and dropIndexSql() i noticed, that the pgsql implementation differs from mysql. The index names usually are build with a '_idx' after the name. This is done through the formatter, i guess.

      I noticed, that in Doctrine_Export class the createIndexSql() method does not use the formatter, while dropIndexSql() do. So creating and dropping indexes on pgsql (in my case) fails because of the different names. It does work on mysql, because Doctrine_Export_Mysql class uses it's own createIndexSql() method where the formatter is used.

      Michael

        Activity

        Hide
        jwage Jonathan H. Wage added a comment -

        Hi, can you provide either a patch or failing test case that shows the issue so that I can write a patch for it? Thanks, Jon

        Show
        jwage Jonathan H. Wage added a comment - Hi, can you provide either a patch or failing test case that shows the issue so that I can write a patch for it? Thanks, Jon
        Hide
        michael.piecko Michael Piecko added a comment -

        I must admit that i never did that (patch). And i know i should. I'll work on that over the weekend.

        Michael

        Show
        michael.piecko Michael Piecko added a comment - I must admit that i never did that (patch). And i know i should. I'll work on that over the weekend. Michael
        Hide
        jwage Jonathan H. Wage added a comment -

        You can just make your changes and then run svn diff in the Doctrine directory and it will produce a patch/diff which you can attach here.

        Show
        jwage Jonathan H. Wage added a comment - You can just make your changes and then run svn diff in the Doctrine directory and it will produce a patch/diff which you can attach here.

          People

          • Assignee:
            jwage Jonathan H. Wage
            Reporter:
            michael.piecko Michael Piecko
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: