not drop user db

This commit is contained in:
andrew (from workstation) 2019-11-25 22:09:36 +01:00
parent 38e2e448fa
commit 1a90f2a01f

View File

@ -313,14 +313,15 @@ Status TdDb::init_sqlite(int32 scheduler_id, const TdParameters &parameters, DbK
LOG(WARNING) << "Got PRAGMA user_version = " << user_version;
// init DialogDb
TRY_STATUS(drop_dialog_db(db, user_version));
bool dialog_db_was_created = false;
if (use_dialog_db) {
TRY_STATUS(init_dialog_db(db, user_version, dialog_db_was_created));
}
// init MessagesDb
TRY_STATUS(drop_messages_db(db, user_version));
if (use_message_db) {
TRY_STATUS(init_messages_db(db, user_version));
}