Allow schema changes in diffs#252
Open
dvdkon wants to merge 30 commits into
Open
Conversation
dvdkon
force-pushed
the
schema-diff
branch
4 times, most recently
from
May 22, 2026 11:26
cdcfeb4 to
d4504be
Compare
dvdkon
marked this pull request as ready for review
May 26, 2026 11:03
dvdkon
force-pushed
the
schema-diff
branch
2 times, most recently
from
June 12, 2026 08:49
adc0426 to
9be2318
Compare
Previously when reading entries, there was only one instance of ChangesetTable kept inside the reader, which would get overwritten on a new entry. This is fast when processing entries sequentially, but complicates/slows down the not-uncommon case of keeping entries around for longer.
Assisted-by: Claude Sonnet 4.6
We now explicitly support these schema changes.
The previously unsupported change is now supported.
Assisted-by: Claude Sonnet 4.6
Assisted-by: Claude Sonnet 4.6
Assisted-by: Claude Sonnet 4.6
Assisted-by: Claude Opus 4.6
Assisted-by: Claude Opus 4.6
Contributor
Author
|
I had Fable review the PR and fixed the most important issues. The full review is here: |
Assisted-by: Claude Sonnet 4.6
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.
Currently we raise an error if the two databases being compared don't share the same schema. This PR adds new changeset entries and new code to work with databases with different schemata, capturing those schema differences in diffs.
Currently missing:
The C
GEODIFF_CE_*API functions were updated to support the new entries. This means thatGEODIFF_CE_operationwill return the new type values and all otherCEfunctions will returnNULLfor the new entries. On the Python side it's similar,ChangesetEntryfor schema change entries will not containold_values,new_valuesortable.Skipping the schema change entries in this API was also considered, but I think this leads to a cleaner API, at the cost of some old code crashing in non-dangerous ways, if it wasn't already checking for NULLs. The alternate approach would require adding a new API or some dynamic flag for at least checking that schema change entries are present.