We have an SQLCipher v3 db which we tried to migrate to v4. Migration, created a new db by appending “-migrate” at the end of the db’s filename and failed to complete the migration process.
The reason it failed was that the DB used PHONEBOOK collation. We figured this out when we tried to open the DB in “DB Browser for SQLite” and got a warning. Then we found that it’s a known issue.
Is there a way to get some error message, like they got on logcat in the other topic, when migrating the DB using SQLCipher for Android?
We currently use QueryHelper.singleValueFromQuery(database, "PRAGMA cipher_migrate");
where QueryHelper is from your test suite.
Nonstandard collations where removed from SQLCipher for Android 3 years ago with the release of support for Android N. There are a couple of options you might explore discussed here:
My question was not about the Collation per se, but more about the way I get an error message if the migration fails for whatever reason. In this case I didn’t see anything in the logcat.
The collation is being included somewhere within your application schema, however it isn’t available at runtime when SQLCipher is looking for it. The migration and failure occur at the native layer; an exception is not thrown in this case, but rather a result code returned from the pragma command representing the result of the operation.