2

I have been using Realm for a while now in a WPF app using Costura. https://blog.jonstodle.com/using-realm-with-fody-costura/

Everything is working fine, but when I try to open a database file created in .NET, I am presented with this message. I've updated all my nuget packages, as well as the realm-wrapper files in the costura directories. It occurs with old, existing databases as well as newly created ones.

Is there some sort of migration I can perform to update existing databases as well as create databases in this new format from now on?

Message on opening the database file in Realm Studio

Julien
  • 212
  • 1
  • 18
  • 53
  • Have you seen this: [Upgrade realm in an Android project](https://stackoverflow.com/questions/39971209/upgrade-realm-in-an-android-project) – Maciej Los Jun 26 '20 at 07:57
  • yes. it's for android.i don't see anything in there that relates – Julien Jun 27 '20 at 17:10

1 Answers1

0

Yes there is, when it comes to realm there are two things you can do:

  1. Delete the old db file and create a new one

  2. Use migrations. Migration in realm is seperated into two different parts

    • Schema versioning automatic migration
    • Schema versioning custom migration

There is alot to cover about these two subjects and it will be too long for this post. You will havae a better time reading it at realm swift guide part 6.

Barr J
  • 10,636
  • 1
  • 28
  • 46