<!---

      Questions: If you have questions about HOW TO use Realm, please ask on
      StackOverflow: http://stackoverflow.com/questions/ask?tags=realm
      We monitor the realm tag.

      Feature Request: Just fill in the first two sections below.

      Bugs: To help you as fast as possible with an issue please describe your issue
      and the steps you have taken to reproduce it in as much detail as possible.

      -->

      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

            Assignee:
            jorgen.edelbo@mongodb.com Jørgen Edelbo
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: