Realm not auto-deleting database if migration needed

后端 未结 2 1589
走了就别回头了
走了就别回头了 2021-01-21 22:57

We are in development and db schema changes occur often. Since we are not live, migrations are not needed. I therefor configured Realm as follows:

RealmConfigura         


        
2条回答
  •  無奈伤痛
    2021-01-21 23:31

    We had a similar issue. We solved this by adding

    Realm.getInstance(config)
    

    right after

    Realm.setDefaultConfiguration(config);
    

    We think the configuration will be set up after Realm is called the first time. This time we don't use any Realm object so there's no exception.

提交回复
热议问题