Skip to content

Loading…

DBAL-235: Column order is not synchronized by Comparator #1411

Open
doctrinebot opened this Issue · 5 comments

2 participants

@doctrinebot

Jira issue originally created by user artem:

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

@doctrinebot

Comment created by chriswoodford:

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

@doctrinebot

Comment created by artem:

Yup, that's exactly what I meant!

@doctrinebot

Comment created by @deeky666:

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...

@doctrinebot

Comment created by artem:

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.

@doctrinebot

Comment created by @deeky666:

[artem] 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. [beberlei] what would you say?

@beberlei beberlei was assigned by doctrinebot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.