diff --git a/CHANGELOG.md b/CHANGELOG.md index a26d549c6..9e3890d1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ * Fixed a wrong mapping for `AuthProviderType` returned by `User.provider` for google, facebook and apple credentials. * Opening an unencrypted file with an encryption key would sometimes report a misleading error message that indicated that the problem was something other than a decryption failure (Core upgrade) * Fix a rare deadlock which could occur when closing a synchronized Realm immediately after committing a write transaction when the sync worker thread has also just finished processing a changeset from the server. (Core upgrade) +* Fixed an issue with `Configuration.disconnectedSync` where changing the schema could result in migration exception. (PR [#999](https://github.com/realm/realm-dart/pull/999)) ### Compatibility * Realm Studio: 12.0.0 or later. diff --git a/lib/src/native/realm_core.dart b/lib/src/native/realm_core.dart index 7c6bddfed..40eebca36 100644 --- a/lib/src/native/realm_core.dart +++ b/lib/src/native/realm_core.dart @@ -231,6 +231,7 @@ class _RealmCore { _realmLib.realm_release(syncConfigPtr.cast()); } } else if (config is DisconnectedSyncConfiguration) { + _realmLib.realm_config_set_schema_mode(configHandle._pointer, realm_schema_mode.RLM_SCHEMA_MODE_ADDITIVE_EXPLICIT); _realmLib.realm_config_set_force_sync_history(configPtr, true); } if (config.encryptionKey != null) {