Uploaded image for project: 'Doctrine DBAL'
  1. Doctrine DBAL
  2. DBAL-566

Schema Comparator does not identify renamed indexes

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.5
    • Component/s: Schema Managers
    • Security Level: All
    • Labels:
      None

      Description

      The schema comparator does not identify renaming of used declared indexes.

      This is partly due to the renamed index always fulfilling itself
      https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Schema/Comparator.php#L440

      it looks like the logic for columns should be repeated, where renames are detected.

        Issue Links

          Activity

          Hide
          deeky666 Steve Müller added a comment -

          May I ask what advantages you get when the comparator detects renamed indexes? An ALTER TABLE statement would still have to drop and recreate the index, doesn't it?

          Show
          deeky666 Steve Müller added a comment - May I ask what advantages you get when the comparator detects renamed indexes? An ALTER TABLE statement would still have to drop and recreate the index, doesn't it?
          Hide
          deeky666 Steve Müller added a comment -
          Show
          deeky666 Steve Müller added a comment - Patch supplied in PR: https://github.com/doctrine/dbal/pull/473
          Hide
          doctrinebot Doctrine Bot added a comment -

          A related Github Pull-Request [GH-473] was closed:
          https://github.com/doctrine/dbal/pull/473

          Show
          doctrinebot Doctrine Bot added a comment - A related Github Pull-Request [GH-473] was closed: https://github.com/doctrine/dbal/pull/473
          Show
          deeky666 Steve Müller added a comment - Fixed in commit: https://github.com/doctrine/dbal/commit/6d0e8e2a8598f121cdb136507022915247fc98b8
          Hide
          ben.davies Ben Davies added a comment -

          Awesome Steve!

          Show
          ben.davies Ben Davies added a comment - Awesome Steve!

            People

            • Assignee:
              deeky666 Steve Müller
              Reporter:
              ben.davies Ben Davies
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: