New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a non-standard DDL command to change position of a column #2242
Comments
That jOOQ issue is unrelated. Firebird uses |
Oh, I missed “between tables” in the description. My bad. Anyway, we need to choose something, such command is useful, because the alternative requires many slow (in large tables) changes. The variant from Firebird is not very good for H2, because H2 expects a data type in that construction where the |
Because H2 uses But in the syntax from Firebird 1-based numeric offsets are used, such syntax is not very user-friendly. |
I had Firebird's syntax in mind, which we also want to support in jOOQ, but indeed, my idea here is to move a column between tables. This is much more sophisticated, and I don't know all the details of this feature yet (or whether it is even a good idea). There needs to be some data migration clause associated with it, and depending on the complexity of possible migrations, it might be better not to abstract over the operation and let users continue to do this manually. I do think Firebird's feature (with whatever syntax) is very useful though. I'm still surprised so few databases see the logical order of columns in tables as something worth investing in. I find it very useful, to be able to specify that column order. |
Add synthetic ALTER TABLE t1 MOVE c1, c2, ... TO t2 [ BEFORE x | AFTER x | FIRST ] command jOOQ/jOOQ#9515@grandinj
@lukaseder
What syntax should be used from your point of view? I don't like the
CHANGE
syntax from MySQL, we partially support it in MySQL compatibility mode (without possibility to reorder the column), but it is disabled in Regular mode and I don't want to enable it.The syntax from jOOQ should actually look likeThe text was updated successfully, but these errors were encountered: