core: re-insert only migrated items

Previously, we were re-inserting all items regardless of whether they
were changed or not. This raised a lot of issues, not to mention
unnecessary load on our servers because after each migration
all the data is re-synced. Since migration takes place independently on
each device, this multiplies exponentially.
Hopefully after this update, this will only happen much more granually.
This commit is contained in:
Abdullah Atta
2022-10-26 10:52:27 +05:00
parent 9f25d623bb
commit 082b9755db
3 changed files with 41 additions and 32 deletions

View File

@@ -201,7 +201,8 @@ export default class Backup {
this._db,
collections,
(id) => data[id],
version
version,
true
);
});
}