From f56e933a3e7cf35ddfbf68e722c5e2216a19c0ab Mon Sep 17 00:00:00 2001 From: ziggie Date: Tue, 17 Mar 2026 20:39:10 +0100 Subject: [PATCH] lnd: add clarifiying comment when introducing a new db --- config_prod.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config_prod.go b/config_prod.go index 60dba8bb5..1b0a5c580 100644 --- a/config_prod.go +++ b/config_prod.go @@ -9,6 +9,16 @@ import ( "github.com/lightningnetwork/lnd/sqldb/sqlc" ) +// NOTE: This file (together with config_test_native_sql.go) contains +// build-tag-specific overrides that control which backend is used for certain +// stores. If any function in either file switches a store between KV and native +// SQL depending on the build tag, and the corresponding migration is later +// promoted from sqldb/migrations_dev.go into the mainline sqldb/migrations.go, +// you must also update the UseNativeSQL branch in BuildDatabase +// (config_builder.go) to use the native SQL backend for that store. Promoting +// the migration without updating the store means the production build will +// continue writing to the KV backend instead of SQL. + // RunTestSQLMigration is a build tag that indicates whether the test_native_sql // build tag is set. var RunTestSQLMigration = false