From 46d2238431eae57744eadbe94c6f2a4883837251 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Wed, 28 Jan 2026 03:55:35 +0530 Subject: [PATCH] fix: migration on trash source column (#25590) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- mobile/lib/infrastructure/repositories/db.repository.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mobile/lib/infrastructure/repositories/db.repository.dart b/mobile/lib/infrastructure/repositories/db.repository.dart index e0e29e8290..2d30e3a0b9 100644 --- a/mobile/lib/infrastructure/repositories/db.repository.dart +++ b/mobile/lib/infrastructure/repositories/db.repository.dart @@ -193,7 +193,13 @@ class Drift extends $Drift implements IDatabaseRepository { await m.addColumn(v14.localAssetEntity, v14.localAssetEntity.longitude); }, from14To15: (m, v15) async { - await m.addColumn(v15.trashedLocalAssetEntity, v15.trashedLocalAssetEntity.source); + await m.alterTable( + TableMigration( + v15.trashedLocalAssetEntity, + columnTransformer: {v15.trashedLocalAssetEntity.source: Constant(TrashOrigin.localSync.index)}, + newColumns: [v15.trashedLocalAssetEntity.source], + ), + ); }, from15To16: (m, v16) async { // Add i_cloud_id to local and remote asset tables