Skip to content

Commit

Permalink
remove back-compat with DB versions 0: fixes an annoying edge case wh…
Browse files Browse the repository at this point in the history
…ere DB version isn't recorded on startup
  • Loading branch information
hoytech committed Jul 19, 2024
1 parent 19cff05 commit 26991c7
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/onAppStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 26991c7

Please sign in to comment.