fix: remainder backup count (#20270)
parent
9bbad45990
commit
07cb2fb04e
|
|
@ -63,13 +63,14 @@ class DriftBackupRepository extends DriftDatabaseRepository {
|
||||||
),
|
),
|
||||||
leftOuterJoin(
|
leftOuterJoin(
|
||||||
_db.remoteAssetEntity,
|
_db.remoteAssetEntity,
|
||||||
_db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum),
|
_db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum) &
|
||||||
|
_db.remoteAssetEntity.ownerId.equals(userId),
|
||||||
useColumns: false,
|
useColumns: false,
|
||||||
),
|
),
|
||||||
])
|
])
|
||||||
..where(
|
..where(
|
||||||
_db.localAlbumEntity.backupSelection.equalsValue(BackupSelection.selected) &
|
_db.localAlbumEntity.backupSelection.equalsValue(BackupSelection.selected) &
|
||||||
(_db.remoteAssetEntity.id.isNull() | _db.remoteAssetEntity.ownerId.equals(userId).not()) &
|
_db.remoteAssetEntity.id.isNull() &
|
||||||
_db.localAlbumAssetEntity.assetId.isNotInQuery(_getExcludedSubquery()),
|
_db.localAlbumAssetEntity.assetId.isNotInQuery(_getExcludedSubquery()),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue