immich/mobile/drift_schemas/main
Santo Shakil 429e181c8f
fix(mobile): run iOS bg task phases in parallel (#28293)
onIosUpload runs sync local, sync remote, hash and handle backup
sequentially. on the bg refresh task path that's a 20s budget from
iOS, and sync + hash usually eat all of it before backup gets a turn
to enqueue any candidates.

these phases don't actually depend on each other. local + remote sync
touch different tables. hash works off whatever's already in drift.
handle backup reads candidates and just enqueues to URLSession bg.
anything one phase produces in this fire shows up to the others on
the next fire, and server-side dedup catches the rare race where
backup enqueues something sync remote was about to mark as already
uploaded.

so this runs all four concurrently via Future.wait, with hash getting
the full maxSeconds-1 budget instead of a fixed 5s. outer budget
timeout still caps everything before iOS expires.

second small change: getAssetsToHash orders by createdAt DESC instead
of id ASC to match getCandidates. when hash runs inside a refresh
fire it processes recent photos first.
2026-06-03 20:13:52 -05:00
..
drift_schema_v1.json feat(mobile): people sync (#19777) 2025-07-18 14:21:39 +00:00
drift_schema_v2.json feat(mobile): people sync (#19777) 2025-07-18 14:21:39 +00:00
drift_schema_v3.json fix: remove foreign constraint on stack.primaryAssetId (#20052) 2025-07-21 15:20:41 -05:00
drift_schema_v4.json fix: show only local assets from albums selected for backup (#20050) 2025-07-23 09:13:15 -05:00
drift_schema_v5.json fix: user profile images not working in beta timeline (#20203) 2025-07-30 11:09:28 -05:00
drift_schema_v6.json fix(mobile): add partial index based on library ID to remote assets (#20214) 2025-07-30 23:59:00 +05:30
drift_schema_v7.json fix: use create if not exists clause for indexes (#20728) 2025-08-06 16:57:33 -05:00
drift_schema_v8.json feat: migrate store to sqlite (#21078) 2025-08-21 14:58:50 -05:00
drift_schema_v9.json feat: album info sync (#21103) 2025-09-04 18:44:10 +00:00
drift_schema_v10.json feat: sync AuthUserV1 (#21565) 2025-09-08 14:00:10 -05:00
drift_schema_v11.json fix: sqlite parameters limit (#22119) 2025-09-19 09:47:56 -04:00
drift_schema_v12.json fix: merged timeline orderby localtime (#22371) 2025-09-29 09:53:40 -05:00
drift_schema_v13.json feat: opt-in sync of deletes and restores from web to Android (beta timeline) (#20473) 2025-11-10 16:20:51 +00:00
drift_schema_v14.json fix: use adjustment time in iOS for hash reset (#24047) 2025-12-03 21:15:58 -06:00
drift_schema_v15.json feat(mobile): do not restore locally deleted assets during trash sync (Android) (#24218) 2026-01-12 21:46:36 +05:30
drift_schema_v16.json fix(mobile): drop unique constraint on cloud_id (#25291) 2026-01-15 17:06:29 -06:00
drift_schema_v17.json fix: mobile edit handling (#25315) 2026-01-19 12:22:53 -06:00
drift_schema_v18.json fix: slow hash reconcilation (#25503) 2026-01-26 09:12:00 -06:00
drift_schema_v19.json chore: add indexes for foreign keys (#25925) 2026-02-12 19:58:31 +05:30
drift_schema_v20.json fix: missing deletedAt and isVisible columns on mobile (#26414) 2026-02-23 09:50:54 -05:00
drift_schema_v21.json feat(mobile): add playbackStyle to local asset entity and related database schema (#26596) 2026-03-01 14:50:21 -05:00
drift_schema_v22.json feat(mobile): SyncAssetEditV1 (#26518) 2026-03-05 13:03:59 -06:00
drift_schema_v23.json refactor(mobile): Migrate durationInSeconds to durationMs (#26615) 2026-04-20 23:28:11 -04:00
drift_schema_v24.json chore!: migrate album owner to album_user (#27467) 2026-04-22 16:52:23 +02:00
drift_schema_v25.json fix: indexes on remote_asset_entity (#28264) 2026-05-12 16:43:24 +00:00
drift_schema_v26.json fix: indexes on remote_asset_entity (#28264) 2026-05-12 16:43:24 +00:00
drift_schema_v27.json refactor: rename metadata to settings (#28691) 2026-05-30 10:27:55 -05:00
drift_schema_v28.json fix(mobile): run iOS bg task phases in parallel (#28293) 2026-06-03 20:13:52 -05:00