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.

Realm Migration Error

See original GitHub issue

Goals

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

  1. 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:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
knethcommented, Oct 5, 2020

@bharadwajagali We will try to get it released during the week (the sooner the better).

0reactions
bharadwajagalicommented, Oct 6, 2020

@kneth thank you

Read more comments on GitHub >

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

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