简体   繁体   中英

Realm Migration Required without realm structure changes

I've made some fixes on my app which was at version 24 on playstore and I changed my version code from 24 to 25 (My realm version is the same as the build version code) . But didn't change nothing on realm structure, didn't add any field, neither remove any. But still I was asked to migrate from version 24 to 25, and i needed to add a weird looking code in a migration class like this:

    if (oldVersion == 24) {

        oldVersion++;
    }

This worked but it looked so strange to me since I didn't change anything, not even a query.

Anyone got any idea what could have triggered this?

这是因为Realm版本号内部存储在Realm文件中,并且用作触发迁移的第一个检查。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM