Realm Migration Error
See original GitHub issueGoals
We are trying to migrate realm from old version to new version it is throwing below error
No Such Column
Expected Results
It should migrate successfully.
Actual Results
Error: No such column
Steps to Reproduce
- We are changing one optional field in a table to mandatory and making that as primary key to that table schema.
Code Sample
Previous Code:
const EmpDetails = { name: ‘EmpDetails’, primaryKey: ‘UId’, properties: { UId: ‘string’, EmployeeId: ‘string?’, Name: ‘string’, }, };
New Code for Migration
const EmpDetails = { name: ‘EmpDetails’, primaryKey: 'EmployeeId, properties: { UId: ‘string’, EmployeeId: ‘string’, Name: ‘string’, }, };
Version of Realm and Tooling
- Realm JS SDK Version: 6.1.0 (Working fine in 3.6.5)
- Node or React Native: 0.61.2
- Client OS & Version: Android 10
- Which debugger for React Native: None
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Realm Migration doesn't work - Stack Overflow
Correct.. this error often happens when you update properties of you realm DB while DB already hold some data. After altering DB properties...
Read more >Solution of Realm Migration Error Code 10
When you start your app on simulator you may get error that said “fatal error: 'try!' expression unexpectedly raised an error: Error Domain=io....
Read more >Realm schema migration block not getting triggered - MongoDB
Hi, I'm using Realm database with iOS and SwiftUI. I added one new field to one of my Realm object schema, let's call...
Read more >Realm migration for app updates - CodeCrew Community
I then set Realm.Configuration.defaultConfiguration and start Realm() as before. However, this results in the following error/crash on start-up:.
Read more >Realm Database Migration error code 10, although schema ...
First I didn't have the thing with the schemaVersion and the migration code inside the configuration of the Realm. Even after I added...
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
@bharadwajagali We will try to get it released during the week (the sooner the better).
@kneth thank you