Skip to content

Comments

Fix for concat changes when one diff is there (not possbile to concat)#583

Merged
MarcelGeo merged 1 commit intodev-r85-v2-pullfrom
fix-one-diff-concat
Feb 23, 2026
Merged

Fix for concat changes when one diff is there (not possbile to concat)#583
MarcelGeo merged 1 commit intodev-r85-v2-pullfrom
fix-one-diff-concat

Conversation

@MarcelGeo
Copy link
Collaborator

  • fix migration with sa.text

@MarcelGeo MarcelGeo requested review from Copilot and varmar05 and removed request for varmar05 February 23, 2026 14:25
@MarcelGeo MarcelGeo changed the title Fix for concat changes when one diff is there (no possbile to concat) Fix for concat changes when one diff is there (not possbile to concat) Feb 23, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 22310140088

Details

  • 15 of 15 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 94.633%

Totals Coverage Status
Change from base Build 22227692371: 0.02%
Covered Lines: 8886
Relevant Lines: 9390

💛 - Coveralls

@MarcelGeo MarcelGeo merged commit 4360184 into dev-r85-v2-pull Feb 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants