greenrobot / greenDAO

greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.
http://greenrobot.org/greendao/
12.63k stars 2.89k forks source link

upgrading sqlcipher from 3 to 4 my app crashes #1088

Open NaserKhoshfetrat opened 2 years ago

NaserKhoshfetrat commented 2 years ago

I have used greendao generator with sqlcipher to encrypt database. but when i am **upgrading sqlcipher from 3.5.7 to 4.4.3, my app crashes since my app cannot access the old encrypted database. I have already searched for a solution and found out that I need to run PRAGMA cipher_migrate in postKey of the SQLiteDatabaseHook to migrate my database.

process must be done as in this link https://discuss.zetetic.net/t/upgrading-sqlcipher-for-android-from-3-to-4/3580 But i could not figure out how to perform this with greendao as orm? any help regarding this upgrade is highly appreciated