add migration and update gitignore to ignore isar
This commit is contained in:
parent
14df94fbb8
commit
49fae9c4cc
3 changed files with 7 additions and 2 deletions
2
mobile/.gitignore
vendored
2
mobile/.gitignore
vendored
|
@ -54,3 +54,5 @@ ios/fastlane/report.xml
|
|||
default.isar
|
||||
default.isar.lock
|
||||
libisar.so
|
||||
default.isar-lck
|
||||
isar.dll
|
|
@ -228,7 +228,6 @@ class Asset {
|
|||
bool canUpdate(Asset a) {
|
||||
assert(isInDb);
|
||||
assert(checksum == a.checksum);
|
||||
assert(thumbhash == a.thumbhash);
|
||||
assert(a.storage != AssetState.merged);
|
||||
return a.updatedAt.isAfter(updatedAt) ||
|
||||
a.isRemote && !isRemote ||
|
||||
|
@ -268,6 +267,7 @@ class Asset {
|
|||
livePhotoVideoId: livePhotoVideoId,
|
||||
isFavorite: isFavorite,
|
||||
isArchived: isArchived,
|
||||
thumbhash: thumbhash,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
@ -282,6 +282,7 @@ class Asset {
|
|||
// isFavorite + isArchived are not set by device-only assets
|
||||
isFavorite: a.isFavorite,
|
||||
isArchived: a.isArchived,
|
||||
thumbhash: a.thumbhash,
|
||||
exifInfo: a.exifInfo?.copyWith(id: id) ?? exifInfo,
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -11,6 +11,8 @@ Future<void> migrateDatabaseIfNeeded(Isar db) async {
|
|||
await _migrateTo(db, 2);
|
||||
case 2:
|
||||
await _migrateTo(db, 3);
|
||||
case 3:
|
||||
await _migrateTo(db, 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue