From e8812bdab644de60abfd7b1e64a53a5b5807b83a Mon Sep 17 00:00:00 2001
From: j-berman <justinberman@protonmail.com>
Date: Thu, 30 Dec 2021 00:29:16 -0800
Subject: [PATCH] Clearer message when migration runs for first time users

---
 src/db/storage.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/db/storage.cpp b/src/db/storage.cpp
index 54ace7e..72cb6e8 100644
--- a/src/db/storage.cpp
+++ b/src/db/storage.cpp
@@ -381,10 +381,9 @@ namespace db
 
     void migrate_0_1(MDB_txn& txn, tables_ const& tables)
     {
-      MINFO("Migrating from db version 0 to 1...");
-
       // All addresses in version 0 were primary addresses, but didn't have a bool `is_subaddress`.
       // This migration adds a falsey `is_subaddress` to every account_address stored in the db.
+      // If no addresses are stored, this wraps up quickly.
       struct account_address_v0
       {
         crypto::public_key view_public; //!< Must be first for LMDB optimizations.
@@ -544,6 +543,9 @@ namespace db
 
     void migrate(MDB_txn& txn, tables_ const& tables, const unsigned oldversion)
     {
+      if (oldversion == 0)
+        MINFO("Setting up database...");
+
       if (oldversion < 1)
         migrate_0_1(txn, tables);
     }