[GH-ISSUE #103] alter table order at the end & invalid SQL #211

Open
opened 2026-03-07 20:42:09 +03:00 by kerem · 0 comments
Owner

Originally created by @dataf3l on GitHub (Oct 22, 2020).
Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/103

output looks like this:

ALTER TABLE tablename ENGINE = ;
ALTER TABLE tablename ENGINE = ;
ALTER TABLE tablename ENGINE = ;

that doesn't look like valid SQL.

ALTER TABLE table1 DROP field1;
ALTER TABLE table2 DROP id;
ALTER TABLE table1 DROP field2;

this makes hard to understand.

can it be changed so it looks like this?

ALTER TABLE table1 DROP field1;
ALTER TABLE table1 DROP field2;
ALTER TABLE table2 DROP id;

in other words, sorted by table?

this is so that the statements are easier to grok by humans.
can anybody help.

Originally created by @dataf3l on GitHub (Oct 22, 2020). Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/103 output looks like this: ALTER TABLE `tablename` ENGINE = ; ALTER TABLE `tablename` ENGINE = ; ALTER TABLE `tablename` ENGINE = ; that doesn't look like valid SQL. ALTER TABLE `table1` DROP `field1`; ALTER TABLE `table2` DROP `id`; ALTER TABLE `table1` DROP `field2`; this makes hard to understand. can it be changed so it looks like this? ALTER TABLE `table1` DROP `field1`; ALTER TABLE `table1` DROP `field2`; ALTER TABLE `table2` DROP `id`; in other words, sorted by table? this is so that the statements are easier to grok by humans. can anybody help.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/DBDiff#211
No description provided.