delete/recreate realm if migration failed
See original GitHub issueIt’s easy to delete realm when migration needed in config. But I’d like to do a migration and delete realm only if migration failed.
I’ve tried to wrap migration code in try/catch block but realm.deleteAll()
does not do the trick.
Please provide some documentation on this.
And BTW. Do the migration is performed in transaction ? Sometimes it looks like failed migration broke the data so fixed migration does not help…
Thanks in advance
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Delete realm if manual migration fails - android - Stack Overflow
You could do something like: try { Realm realm = Realm.getInstance(config); realm.close(); } catch (RealmMigrationNeededException e) { Realm ...
Read more >Cisco UCS Faults and Error Messages Reference Guide ...
Cisco UCS Faults and Error Messages Reference Guide, Release 3.1. ... If the previous server was intentionally removed and a new one was ......
Read more >deleteRealmIfMigrationNeeded - MongoDB
deleteRealmIfMigrationNeeded ... Setting this will change the behavior of how migration exceptions are handled. ... This will result in loss of data.
Read more >Exchange 2016 - Error 500 when trying to access ECP as ...
All,We are currently migrating from a single Exchange 2010 to a 2 016 DAG composed of 2 server.All was working fine, we wer....
Read more >Free Character Realm Migration Reversal - Blizzard Support
Information about the error "Error. Please address these issues: The selected realm is not accepting character transfers at this time.".
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I tried to check with DynamicRealm and it’s working yes. I’ll take a look about your lib, i don’t want to check if i need to delete base every schema update.
Thanks @Zhuinden !
the solution by @jpmcosta used to work this a new regression in 4.1.1 as far as I can tell. can we treat as a regression issue and fix this.