WatermelonDB v0.13.0 Release Notes

Release Date: 2019-07-18 // almost 5 years ago
  • โš ๏ธ Breaking

    • [Database] It is now mandatory to pass actionsEnabled: option to Database constructor. It is recommended that you enable this option:

       const database = new Database({
         adapter: ...,
         modelClasses: [...],
         actionsEnabled: true
       })
      

      See docs/Actions.md for more details about Actions. You can also pass false to maintain backward compatibility, but this option will be removed in a later version

    • [Adapters] migrationsExperimental prop of SQLiteAdapter and LokiJSAdapter has been renamed to migrations.

    ๐Ÿ†• New features

    • [Actions] You can now batch deletes by using prepareMarkAsDeleted or prepareDestroyPermanently
    • ๐ŸŽ [Sync] Performance: synchronize() no longer calls your pushChanges() function if there are no local changes to push. This is meant to save unnecessary network bandwidth. โš ๏ธ Note that this could be a breaking change if you rely on it always being called
    • ๐Ÿ”€ [Sync] When setting new values to fields on a record, the field (and record) will no longer be marked as changed if the field's value is the same. This is meant to improve performance and avoid unnecessary code in the app. โš ๏ธ Note that this could be a breaking change if you rely on the old behavior. For now you can import experimentalSetOnlyMarkAsChangedIfDiffers from @nozbe/watermelondb/Model/index and call if with (false) to bring the old behavior back, but this will be removed in the later version -- create a new issue explaining why you need this
    • ๐Ÿ”€ [Sync] Small perf improvements

    ๐Ÿ‘Œ Improvements

    • [Typescript] Improved types for SQLite and LokiJS adapters, migrations, models, the database and the logger.