diff --git a/tddb/td/db/SqliteDb.cpp b/tddb/td/db/SqliteDb.cpp index b33a93fa5..7f8b9726d 100644 --- a/tddb/td/db/SqliteDb.cpp +++ b/tddb/td/db/SqliteDb.cpp @@ -189,13 +189,8 @@ Result SqliteDb::do_open_with_key(CSlice path, const DbKey &db_key, bo auto key = db_key_to_sqlcipher_key(db_key); TRY_STATUS(db.exec(PSLICE() << "PRAGMA key = " << key)); if (with_cipher_migrate) { - LOG(INFO) << "Start 'PRAGMA cipher_migrate' for " << path; - PerfWarningTimer timer("PRAGMA cipher_migrate", 0.5); - TRY_RESULT(code, db.get_pragma_string("cipher_migrate")); - LOG(INFO) << "Finish 'PRAGMA cipher_migrate' for " << path; - if (code != "0") { - return Status::Error(PSLICE() << "'PRAGMA cipher_migrate' failed - " << code); - } + LOG(INFO) << "Try Sqlcipher compatibility mode"; + TRY_STATUS(db.exec("PRAGMA cipher_compatibility = 3")); } } TRY_STATUS_PREFIX(db.check_encryption(), "Can't open database: ");