Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-740

[GH-473] [DBAL-234] Add support for renaming indexes

    Details

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

      Description

      This issue is created automatically through a Github pull request on behalf of deeky666:

      Url: https://github.com/doctrine/dbal/pull/473

      Message:

      Currently renamed only indexes are scheduled for removal and recreation in the comparator. However recreating an index when only the name has changed is very inefficient on large tables as it internally requires a table recreation on most of the platforms. Many vendors offer a more efficient syntax for renaming indexes which saves the table recreation. This PR introduces this behaviour on capable platforms. Platforms that do not support this kind of syntax still use the current behaviour of dropping and recreating an index.
      This PR also introduces the `Table::renameIndex()` method and the `MySQL57Platform` platform which adds [support for explicitly renaming indexes](http://dev.mysql.com/doc/refman/5.7/en/mysql-nutshell.html).

        Activity

        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

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Doctrine Bot
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: