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 passfalse
to maintain backward compatibility, but this option will be removed in a later version[Adapters]
migrationsExperimental
prop ofSQLiteAdapter
andLokiJSAdapter
has been renamed tomigrations
.
๐ New features
- [Actions] You can now batch deletes by using
prepareMarkAsDeleted
orprepareDestroyPermanently
- ๐ [Sync] Performance:
synchronize()
no longer calls yourpushChanges()
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.