-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
What happened?
i have db model A, in new schema, add property for A. update schema from 2 -> 3.
i got error Migration required.
Migration required: Migration is required due to the following errors
Property 'ABTokenDBInfo.isSupportUtp' has been added
Property 'ABTokenDBInfo.isSupportStatistics' has been added.. Error code: realm_errno.RLM_ERR_SCHEMA_MISMATCH.. See https://www.mongodb.com/docs/realm/sdk/flutter/realm-database/model-data/update-realm-object-schema/#manually-migrate-schema for more details
when i open helpLink, i use auto-migrate-schema, i have not migratecallback.
and i found changeLog.md
* Added a new exception - MigrationRequiredExceptionthat will be thrown when a local Realm is opened with a schema that differs from the schema on disk and no migration callback is supplied. Additionally, ahelpLinkproperty has been added toRealmException and its subclasses to provide a link to the documentation for the error. (Issue [#1448](https://github.com/realm/realm-dart/issues/1448))
so.
auto-migrate-schema is support?
how can i migrate my dbModel?
eg:
LocalTokenRepository() {
realmConfig = Configuration.local([
ABTokenDBInfo.schema,
], schemaVersion: dbVersion);
}
- dbVersion from 2 -> 3.
- ABTokenInfo add 'is_support_field'.
- i had execute
dart run realm generate
Repro steps
no
Version
20.1.1
What Atlas Services are you using?
Local Database only
What type of application is this?
Flutter Application
Client OS and version
iOS
Code snippets
No response