openchs-models 1.31.47 → 1.31.48

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
@@ -369,6 +369,11 @@ function migrateAllEmbeddedForTxnData(oldDB, newDB) {
369
369
 
370
370
  function createRealmConfig() {
371
371
  return {
372
+ shouldCompact: function (totalBytes, usedBytes) {
373
+ const doCompact = totalBytes / usedBytes > 1.1;
374
+ console.log("Should compact", totalBytes, usedBytes, doCompact);
375
+ return doCompact;
376
+ },
372
377
  //order is important, should be arranged according to the dependency
373
378
  schemaVersion: 187,
374
379
  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.47",
4
+ "version": "1.31.48",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",