payments/migration1: wire KV→SQL migration in the main pkg

Hook the payments KV→SQL migration into the SQL migration config.
The migration is still only available when building with the build tag
"test_native_sql".

Moreover a tombstone protection similar to the invoice migration is added
to prevent re-runningi with the KV backend  once migration completes.
This commit is contained in:
ziggie committed 2026-02-25 18:52:33 +01:00
1 parent 4b30bed0ac
commit f174b60b94
4 files changed
+145

No files matched your search

+2
View File
@@ -3,6 +3,7 @@ package paymentsdb
import (
"github.com/btcsuite/btclog/v2"
"github.com/lightningnetwork/lnd/build"
paymentsmig1 "github.com/lightningnetwork/lnd/payments/db/migration1"
)
// log is a logger that is initialized with no output filters. This
@@ -29,4 +30,5 @@ func DisableLog() {
// using btclog.
func UseLogger(logger btclog.Logger) {
log = logger
paymentsmig1.UseLogger(logger)
}