From 26991c79f3eb187cce5beb7b6b3caa241d18ba09 Mon Sep 17 00:00:00 2001 From: Doug Hoyte Date: Fri, 19 Jul 2024 00:19:27 -0400 Subject: [PATCH] remove back-compat with DB versions 0: fixes an annoying edge case where DB version isn't recorded on startup --- src/onAppStartup.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/onAppStartup.cpp b/src/onAppStartup.cpp index 17aeda4..241da57 100644 --- a/src/onAppStartup.cpp +++ b/src/onAppStartup.cpp @@ -22,20 +22,6 @@ static void dbCheck(lmdb::txn &txn, const std::string &cmd) { auto s = env.lookup_Meta(txn, 1); if (!s) { - { - // The first version of the DB didn't use a Meta entry -- we consider this version 0 - - bool eventFound = false; - - env.foreach_Event(txn, [&](auto &ev){ - eventFound = true; - return false; - }); - - if (cmd == "export" || cmd == "info") return; - if (eventFound) dbTooOld(0); - } - env.insert_Meta(txn, CURR_DB_VERSION, 1); return; }