From f73796597c4f0456cc7022fa2789f00f909b3d78 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Fri, 3 Jul 2026 00:34:37 +0530 Subject: [PATCH] fix: albums broken on v2 mobile clients (#29446) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- mobile/lib/domain/services/sync_stream.service.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mobile/lib/domain/services/sync_stream.service.dart b/mobile/lib/domain/services/sync_stream.service.dart index 5a197dc88a..3d0bf6955e 100644 --- a/mobile/lib/domain/services/sync_stream.service.dart +++ b/mobile/lib/domain/services/sync_stream.service.dart @@ -25,6 +25,7 @@ enum SyncMigrationTask { v20260128_CopyExifWidthHeightToAsset, // Asset table has incorrect width and height for video ratio calculations. v20260128_ResetAssetV1, // Asset v2.5.0 has width and height information that were edited assets. v20260597_ResetAssetV1AssetV2, // Assets didn't include the uploadedAt column. + v20260701_ResetAlbumsV1, // Album user migration dropped the owner. Sync fresh albums from the server to re-populate them. } class SyncStreamService { @@ -103,6 +104,12 @@ class SyncStreamService { } Future _runPreSyncTasks(List migrations, SemVer semVer) async { + if (!migrations.contains(SyncMigrationTask.v20260701_ResetAlbumsV1.name)) { + _logger.info("Running pre-sync task: v20260701_ResetAlbumsV1"); + await _syncApiRepository.deleteSyncAck([SyncEntityType.albumV1]); + migrations.add(SyncMigrationTask.v20260701_ResetAlbumsV1.name); + } + if (!migrations.contains(SyncMigrationTask.v20260128_ResetExifV1.name)) { _logger.info("Running pre-sync task: v20260128_ResetExifV1"); await _syncApiRepository.deleteSyncAck([