Async Migrations: what's the intended way to do this? #6896
Unanswered
aclelland-netfore
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I'm trying to figure out how I should be handling async migrations as it doesn't seem like
Realm.open()
seems like it waits for the migrations (The migration doesn't even work to begin with). I feel like I must be doing something stupid since this seems like it would be a fairly common use case.I always get an error which is logged when it tries to access the realm object after the async call. I see this one a lot so I'm not sure if it's because of expo/metro or if it's just because I'm trying to access a Realm after an await.
What is the intended way I should be approaching this? Is there any documentation I could be pointed at or examples that I'm most likely missing? Do I need do make the migrations synchronous by fetching all the data I may need for a migration before I attempt to open the realm?
Beta Was this translation helpful? Give feedback.
All reactions