Skip to content

Commit a0ab831

Browse files
committed
avniproject/avni-client#1679 | Update fix in 14.3
1 parent b27a9a3 commit a0ab831

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Schema.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ function createRealmConfig() {
256256
return doCompact;
257257
},
258258
//order is important, should be arranged according to the dependency
259-
schemaVersion: 202,
259+
schemaVersion: 203,
260260
onMigration: function (oldDB, newDB) {
261261
console.log("[AvniModels.Schema]", `Running migration with old schema version: ${oldDB.schemaVersion} and new schema version: ${newDB.schemaVersion}`);
262262
if (oldDB.schemaVersion === VersionWithEmbeddedMigrationProblem)
@@ -980,9 +980,11 @@ function createRealmConfig() {
980980
}
981981
});
982982
}
983-
if (oldDB.schemaVersion < 202) {
984-
_.forEach(newDB.objects("SubjectType"), (stype) => {
985-
stype.loadedSince = EntitySyncStatus.REALLY_OLD_DATE.getTime();
983+
if (oldDB.schemaVersion < 203) {
984+
_.forEach(newDB.objects(EntitySyncStatus.schema.name), (ess) => {
985+
if (ess.entityName === 'SubjectType') {
986+
ess.loadedSince = EntitySyncStatus.REALLY_OLD_DATE;
987+
}
986988
});
987989
}
988990
},

0 commit comments

Comments
 (0)