lnd: make the payment schema migration available for testing
What changed, and why it matters
This commit only changes a development-only test configuration file so that an existing database schema migration for payments is also applied during a specific test mode (test_native_sql). It does not alter production code, add new migrations, or change any runtime behavior. There is no security issue visible in the diff.
No security action required. Review as normal code-quality/test-coverage change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change populates the previously empty migrationAdditions slice in sqldb/migrations_dev.go with a single MigrationConfig entry for migration 000009_payments (Version 11, SchemaVersion 9). This file is guarded by a //go:build dev build tag, meaning it is used only in development/test builds. The effect is to ensure the payments schema migration is applied when test_native_sql is active, aligning test database construction with the expected schema. No logic, permissions, or production migration ordering is changed.
Changed components
sqldb/migrations_dev.goInspect captured patch +7 / −1
diff --git a/sqldb/migrations_dev.go b/sqldb/migrations_dev.go
index a1b2501..4158cb9 100644
--- a/sqldb/migrations_dev.go
+++ b/sqldb/migrations_dev.go
@@ -2,4 +2,10 @@
package sqldb
-var migrationAdditions []MigrationConfig
+var migrationAdditions = []MigrationConfig{
+ {
+ Name: "000009_payments",
+ Version: 11,
+ SchemaVersion: 9,
+ },
+}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.