question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

delete/recreate realm if migration failed

See original GitHub issue

It’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:closed
  • Created 6 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
RemyTabardelcommented, Nov 22, 2017

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 !

0reactions
AamirAbrocommented, Nov 27, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found