openchs-models 1.31.39 → 1.31.41

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.
Files changed (2) hide show
  1. package/dist/Schema.js +5 -0
  2. package/package.json +1 -1
package/dist/Schema.js CHANGED
@@ -375,6 +375,11 @@ function migrateAllEmbeddedForTxnData(oldDB, newDB) {
375
375
 
376
376
  function createRealmConfig() {
377
377
  return {
378
+ shouldCompact: function (totalBytes, usedBytes) {
379
+ const doCompact = totalBytes / usedBytes > 1.1;
380
+ console.log("Should compact", totalBytes, usedBytes, doCompact);
381
+ return doCompact;
382
+ },
378
383
  //order is important, should be arranged according to the dependency
379
384
  schemaVersion: 185,
380
385
  onMigration: function (oldDB, newDB) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "openchs-models",
3
3
  "description": "OpenCHS data model to be used by front end clients",
4
- "version": "1.31.39",
4
+ "version": "1.31.41",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",