Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-235

Column order is not synchronized by Comparator

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: Schema Managers
    • Security Level: All
    • Labels:
      None
    • Environment:
      MySQL

      Description

      Comparator does not synchronize column order. It would be great if it did.

        Activity

        Artem Goutsoul created issue -
        Hide
        Chris Woodford added a comment -

        I assume that this means adding AFTER to any ALTER ADD statements? if so, this is something that i would really appreciate as well

        Show
        Chris Woodford added a comment - I assume that this means adding AFTER to any ALTER ADD statements? if so, this is something that i would really appreciate as well
        Hide
        Artem Goutsoul added a comment -

        Yup, that's exactly what I meant!

        Show
        Artem Goutsoul added a comment - Yup, that's exactly what I meant!
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Workflow jira [ 13512 ] jira-feedback2 [ 17601 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17601 ] jira-feedback3 [ 19955 ]
        Hide
        Steve Müller added a comment -

        AFAIK only MySQL supports changing column order after table creation. All other vendors need a table recreation for this. Why exactly do you need this? I cannot think of a use case where the order in which columns are stored in the table is of any importance. And as this is a MySQL only specific feature which needs some heavy calculations in the comparator, I doubt this will be implemented...

        Show
        Steve Müller added a comment - AFAIK only MySQL supports changing column order after table creation. All other vendors need a table recreation for this. Why exactly do you need this? I cannot think of a use case where the order in which columns are stored in the table is of any importance. And as this is a MySQL only specific feature which needs some heavy calculations in the comparator, I doubt this will be implemented...
        Hide
        Artem Goutsoul added a comment -

        It's very convenient to use MySQL column order so that the columns show up in some sane order in DB management tools.
        Also an application can show some tables in a sane way without explicit column order specification.

        We are currently using it widely in our app. Our ORM is actually picking up the object specifications directly from the database and it's not specified in the application code.

        Show
        Artem Goutsoul added a comment - It's very convenient to use MySQL column order so that the columns show up in some sane order in DB management tools. Also an application can show some tables in a sane way without explicit column order specification. We are currently using it widely in our app. Our ORM is actually picking up the object specifications directly from the database and it's not specified in the application code.
        Hide
        Steve Müller added a comment -

        Artem Goutsoul I get the point. But as I already stated only MySQL supports column reordering without requiring a table recreation AFAIK. How would you expect other platforms to behave in column reordering scenarios? I think it's weird if only MySQL platform can react to column reorderings and we have to adjust the comparator for a just a single platform. Benjamin Eberlei what would you say?

        Show
        Steve Müller added a comment - Artem Goutsoul I get the point. But as I already stated only MySQL supports column reordering without requiring a table recreation AFAIK. How would you expect other platforms to behave in column reordering scenarios? I think it's weird if only MySQL platform can react to column reorderings and we have to adjust the comparator for a just a single platform. Benjamin Eberlei what would you say?

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-235, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Artem Goutsoul
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: