Description
Hi,
I'm testing the v2.0.0 RC5 version.
I'm trying to export files from an unencrypted database to an encrypted database.
I'm using sqlcipher_export() function to export it.
Whenever i call sqlcipher_export() the error "table android_metadata already exists" occurs.
The android_metadata table is a default table created automatically. Of course, when I delete android_metadata table in the target database before calling sqlcipher_export() it works. But it would be nice that SqlCipher for Android would handle this.
Or maybe I'm doing somthing wrong?
[source]
SQLiteDatabase database = SQLiteDatabase.openDatabase(unEncryptedDBPath, "", null, SQLiteDatabase.OPEN_READWRITE);
database.execSQL("ATTACH DATABASE '" + encryptedDBPath + "' AS encrypted KEY 'testit';");
database.rawExecSQL("SELECT sqlcipher_export('encrypted');");
database.execSQL("DETACH DATABASE encrypted;");
database.close();
[/source]
regards,
Tom