openchs-models 1.32.42 → 1.32.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Schema.js +10 -2
- package/dist/SyncTelemetry.js +2 -2
- package/package.json +1 -1
package/dist/Schema.js
CHANGED
|
@@ -283,7 +283,7 @@ function createRealmConfig() {
|
|
|
283
283
|
return doCompact;
|
|
284
284
|
},
|
|
285
285
|
//order is important, should be arranged according to the dependency
|
|
286
|
-
schemaVersion:
|
|
286
|
+
schemaVersion: 202,
|
|
287
287
|
onMigration: function (oldDB, newDB) {
|
|
288
288
|
console.log("[AvniModels.Schema]", `Running migration with old schema version: ${oldDB.schemaVersion} and new schema version: ${newDB.schemaVersion}`);
|
|
289
289
|
if (oldDB.schemaVersion === VersionWithEmbeddedMigrationProblem) throw new Error(`Update from schema version ${VersionWithEmbeddedMigrationProblem} is not allowed. Please uninstall and install app.`);
|
|
@@ -972,12 +972,20 @@ function createRealmConfig() {
|
|
|
972
972
|
});
|
|
973
973
|
}
|
|
974
974
|
|
|
975
|
-
if (oldDB.schemaVersion <
|
|
975
|
+
if (oldDB.schemaVersion < 201) {
|
|
976
976
|
_lodash.default.forEach(newDB.objects("Concept"), concept => {
|
|
977
977
|
concept.mediaType = null;
|
|
978
978
|
concept.mediaUrl = null;
|
|
979
979
|
});
|
|
980
980
|
}
|
|
981
|
+
|
|
982
|
+
if (oldDB.schemaVersion < 202) {
|
|
983
|
+
_lodash.default.forEach(newDB.objects("SyncTelemetry"), syncTelemetry => {
|
|
984
|
+
if (syncTelemetry.appInfo === '') {
|
|
985
|
+
syncTelemetry.appInfo = null;
|
|
986
|
+
}
|
|
987
|
+
});
|
|
988
|
+
}
|
|
981
989
|
}
|
|
982
990
|
};
|
|
983
991
|
}
|
package/dist/SyncTelemetry.js
CHANGED
|
@@ -139,7 +139,7 @@ class SyncTelemetry extends _BaseEntity.default {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
getAppInfo() {
|
|
142
|
-
return JSON.parse(this.appInfo);
|
|
142
|
+
return this.appInfo === '' ? {} : JSON.parse(this.appInfo);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
get toResource() {
|
|
@@ -184,7 +184,7 @@ _defineProperty(SyncTelemetry, "schema", {
|
|
|
184
184
|
entityStatus: "string",
|
|
185
185
|
syncSource: 'string?',
|
|
186
186
|
deviceInfo: "string",
|
|
187
|
-
appInfo: "string"
|
|
187
|
+
appInfo: "string?"
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
190
|
|