Skip to content

Commit

Permalink
merge 7.0 to master
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed Mar 12, 2024
2 parents e774a4f + 068dc82 commit 44c39ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ function migrateAllEmbeddedForTxnData(oldDB, newDB) {

function createRealmConfig() {
return {
shouldCompact: function (totalBytes, usedBytes) {
const doCompact = (totalBytes / usedBytes) > 1.1;
console.log("Should compact", totalBytes, usedBytes, doCompact);
return doCompact;
},
//order is important, should be arranged according to the dependency
schemaVersion: 187,
onMigration: function (oldDB, newDB) {
Expand Down

0 comments on commit 44c39ab

Please sign in to comment.