[BUGFIX] consider fields to ignore when generating new records sql#8
Merged
jasdeepkhalsa merged 1 commit intoDBDiff:masterfrom May 22, 2016
webian:master
Merged
[BUGFIX] consider fields to ignore when generating new records sql#8jasdeepkhalsa merged 1 commit intoDBDiff:masterfrom webian:master
jasdeepkhalsa merged 1 commit intoDBDiff:masterfrom
webian:master
Conversation
Bug: if servers are different and there are fields to ignore, the generated SQL for new records didn't include the ignored fields. This commit fixes this bug unsetting the array element to ignore only when the comparison is made.
Member
|
Thanks for that! I don't have much time to thoroughly test new features so glad you've taken the initiative :) |
jasdeepkhalsa
added a commit
that referenced
this pull request
Mar 25, 2026
InsertDataSQL::getUp() and DeleteDataSQL::getDown() now emit explicit column name lists: INSERT INTO `t` (`col1`,`col2`) VALUES(...) instead of positional INSERT INTO `t` VALUES(...). This prevents silent data corruption when source and target tables have identical columns in different order (common after ALTER TABLE ADD on different servers). Also handles NULL values correctly in the column list. Added unit tests covering: - Column names included in INSERT output - NULL value handling in INSERT - DELETE UP/DOWN direction correctness Refs: bugs.md Bug #8
jasdeepkhalsa
added a commit
that referenced
this pull request
Mar 25, 2026
Bug #8 changed INSERT statements from positional VALUES to explicit column lists: Before: INSERT INTO "posts" VALUES('3','2',...) After: INSERT INTO "posts" ("id","user_id",...) VALUES('3','2',...) Update all affected PostgreSQL (14-18) comprehensive test baselines and the end2end baselines for both PostgreSQL and SQLite to match the new correct output. MySQL baselines were unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug: if servers are different and there are fields to ignore, the generated SQL for new records didn't include the ignored fields. This commit fixes this bug unsetting the array element to ignore only when the comparison is made.