From 89d181a6481d495d161c92c405af3b97ae984716 Mon Sep 17 00:00:00 2001 From: Gabriel mermelstein Date: Fri, 17 Jan 2025 13:21:54 +0100 Subject: [PATCH] add comment --- waku/factory/node_factory.nim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/waku/factory/node_factory.nim b/waku/factory/node_factory.nim index 4101519192..f815eec368 100644 --- a/waku/factory/node_factory.nim +++ b/waku/factory/node_factory.nim @@ -268,12 +268,18 @@ proc setupProtocols( ## Regarding storage, the only diff between the current/future archive driver and the legacy ## one, is that the legacy stores an extra field: the id (message digest.) + ## TODO: remove this "migrate" variable once legacy store is removed + ## It is now necessary because sqlite's legacy store has an extra field: storedAt + ## This breaks compatibility between store's and legacy store's schemas in sqlite + ## So for now, we need to make sure that when legacy store is enabled and we use sqlite + ## that we migrate our db according to legacy store's schema to have the extra field var postgres = false when defined(postgres): postgres = true let migrate = if not postgres and conf.legacyStore: false else: conf.storeMessageDbMigration + let archiveDriverRes = waitFor driver.ArchiveDriver.new( conf.storeMessageDbUrl, conf.storeMessageDbVacuum, migrate, conf.storeMaxNumDbConnections, onFatalErrorAction,