Room Proguard - re-obfuscating old database members

Viewed 36

I have a major production bug! Without notice I uploaded a room version without the Proguard rules: -keepclassmembers class mypackagename.models.{;} -keepnames class mypackagename.models.{;}

So my data base look something like this: [{"a":787.0,"b":615.0,"c":250.0,"d":false},{"a":1077.0,"b":386.0,"c":402.0,"d":false},{"a":484.0,"b":789.0,"c":267.0,"d":false},{"a":125.0,"b":10.0,"c":500.0,"d":false},{"a":493.0,"b":1185.0,"c":319.0,"d":false}]

But in my new version I Added the new rules and now the db look something likee this:

[{"name":787.0,"size":615.0,"point":250.0,"isFound":false},{"name":1077.0,"size":386.0,"point":402.0,"isFound":false},{"name":484.0,"size":789.0,"point":267.0,"isFound":false},{"name":125.0,"size":10.0,"point":500.0,"isFound":false},{"name":493.0,"b":1185.0,"point":319.0,"isFound":false}]

When a user from a previous version migrate to the current version - the app simply don't work.

Is there a way that I can migrate the db with the new profound rules? Or alternately, is there a way to change the proguard rules in runtime?

Thanks in advance I hope my question is clear.

0 Answers
Related