DEV Community

Discussion on: Realm Data Storage in React Native and Node.js

Collapse
 
humbertojr profile image
Humberto Jr

Hello good morning friend Spencer, as you have more experience than I have with RealmDB, following DOC I was unable to make a simple migration, I am used to using sequelize among others.

export const oldAreaSchema = {
name: 'Microarea',
primaryKey: 'value',
properties: {
value: {type: 'int?', indexed: true},
label: {type: 'string?', default: ''},
},
};

export const newAreaSchema = {
name: 'Microarea',
primaryKey: 'value',
properties: {
value: {type: 'int?', indexed: true},
name: {type: 'string?', default: ''},
label: {type: 'string?', default: ''},
},
};

How would it be to add another field on properties?

Thank you in advance, who can help me