Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-566

Schema Comparator does not identify renamed indexes

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major 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
          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
          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
          Steve Müller added a comment -
          Show
          Steve Müller added a comment - Patch supplied in PR: https://github.com/doctrine/dbal/pull/473
          Hide
          Doctrine Bot added a comment -

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

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

          Awesome Steve!

          Show
          Ben Davies added a comment - Awesome Steve!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: