Fix for concat changes when one diff is there (not possbile to concat)#583
Merged
MarcelGeo merged 1 commit intodev-r85-v2-pullfrom Feb 23, 2026
Merged
Fix for concat changes when one diff is there (not possbile to concat)#583MarcelGeo merged 1 commit intodev-r85-v2-pullfrom
MarcelGeo merged 1 commit intodev-r85-v2-pullfrom
Conversation
Collaborator
MarcelGeo
commented
Feb 23, 2026
- fix migration with sa.text
- fix migration with sa.text
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where geodiff.concat_changes fails when there is only one diff to concatenate, and updates an Alembic migration to use the required sa.text() wrapper for raw SQL strings.
Changes:
- Added handling for single-diff checkpoint creation by copying instead of concatenating
- Fixed migration file to wrap raw SQL strings with
sa.text()for SQLAlchemy 2.0+ compatibility - Added test coverage for the single-diff checkpoint scenario
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| server/migrations/community/bd1ec73db389_create_file_diff_table.py | Wrapped raw SQL strings in sa.text() calls and cleaned up trailing whitespace |
| server/mergin/sync/models.py | Added copy_file import and logic to copy instead of concatenate when there's only one diff |
| server/mergin/tests/test_public_api_v2.py | Added test case for single-diff checkpoint and increased version count to v33 to support the test |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pull Request Test Coverage Report for Build 22310140088Details
💛 - Coveralls |
varmar05
approved these changes
Feb 23, 2026
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.