Skip to content

Conversation

@zerox80
Copy link
Contributor

@zerox80 zerox80 commented Dec 1, 2025

Fix crash in Migration 48 due to missing transfer columns

Description

This PR fixes a crash that occurred during the database migration from version 47 to 48.
The application was throwing an IllegalStateException: Migration didn't properly handle: transfers because the transfers table schema in the database did not match the OCTransferEntity definition.

Specifically, the following columns were missing in the migration but expected by the Entity:

  • tusUploadUrl
  • tusUploadLength
  • tusUploadMetadata
  • tusUploadChecksum
  • tusResumableVersion
  • tusUploadExpires
  • tusUploadConcat

Changes

  • Migration_48.kt: Added the missing ALTER TABLE statements to add the TUS-related columns to the transfers table.
  • MigrationToDB48Test.kt: Added a new instrumentation test to verify that the migration from version 47 to 48 completes successfully and that the new columns are correctly added while preserving existing data.

Verification

  • Created and ran MigrationToDB48Test.
  • Verified that the test passes on API 36 emulator.
> Task :opencloudData:connectedDebugAndroidTest
Starting 1 tests on Medium_Phone_API_36.0(AVD) - 16
Finished 1 tests on Medium_Phone_API_36.0(AVD) - 16
BUILD SUCCESSFUL

Related Issue

  • Fixes crash reported during upgrade testing.

@guruz guruz merged commit ab33fd6 into opencloud-eu:main Dec 1, 2025
3 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.

2 participants