mirror of
https://github.com/immich-app/immich.git
synced 2025-10-26 08:12:33 -04:00
fix: beta migration check (#22092)
fix: beta migration Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
9ac120c772
commit
2e945281fc
@ -65,7 +65,7 @@ Future<void> migrateDatabaseIfNeeded(Isar db, Drift drift) async {
|
|||||||
// Handle migration only for this version
|
// Handle migration only for this version
|
||||||
// TODO: remove when old timeline is removed
|
// TODO: remove when old timeline is removed
|
||||||
final needBetaMigration = Store.tryGet(StoreKey.needBetaMigration);
|
final needBetaMigration = Store.tryGet(StoreKey.needBetaMigration);
|
||||||
if (version == 15 && needBetaMigration == null) {
|
if (version >= 15 && needBetaMigration == null) {
|
||||||
// Check both databases directly instead of relying on cache
|
// Check both databases directly instead of relying on cache
|
||||||
|
|
||||||
final isBeta = Store.tryGet(StoreKey.betaTimeline);
|
final isBeta = Store.tryGet(StoreKey.betaTimeline);
|
||||||
@ -73,7 +73,7 @@ Future<void> migrateDatabaseIfNeeded(Isar db, Drift drift) async {
|
|||||||
|
|
||||||
// For new installations, no migration needed
|
// For new installations, no migration needed
|
||||||
// For existing installations, only migrate if beta timeline is not enabled (null or false)
|
// For existing installations, only migrate if beta timeline is not enabled (null or false)
|
||||||
if (isNewInstallation || isBeta == true) {
|
if (isNewInstallation || isBeta == true || (version > 15 && isBeta == null)) {
|
||||||
await Store.put(StoreKey.needBetaMigration, false);
|
await Store.put(StoreKey.needBetaMigration, false);
|
||||||
await Store.put(StoreKey.betaTimeline, true);
|
await Store.put(StoreKey.betaTimeline, true);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user