How to edit my realm file with Realm Studio?


#1

First of all, excuse me for a newbie question. I’m absolutely new to Realm.

I’m building a mobile application using React Native and Realm. I’ve read Realm documentation and describe my schemas with JavaScript.

My application works perfectly with the database (I point path in schemas). But how can I fill my database with Realm Studio? When I open created .realm file, I see no data, Realm Studio writes to me that no classes have been created. Can I import my schemas into Realm Studio?

I also tried to create realm file from zero with Realm Studio. It works perfect, but I can’t edit types (names, etc) of fields.

Is there a right way, guys? Please, help me!

Thanks!


#2

Hi Dmitry,

Sorry for the late reply.

If you copy your .realm file from your device to Realm Studio you should be able to see both the schemas created through your app and the data that you’ve created on the device.

If you want to create a new class using studio, you can do so by clicking the opening up the Realm and clicking the “+” button next to the text “CLASSES” in the browser:

At the moment only additive changes are allowed through studio as destructive changes (such as deleting or renaming properties or classes) requires a developer to write a migration. We will most likely add this at some point in the future but the timeline for this is not settled.

I hope this answer helps you get started using Realm and Studio - feel free to follow up with further questions: As always StackOverflow https://stackoverflow.com/questions/ask is a good place to get answers for questions like this.