sqldb: add new gossip v2 columns to graph tables

Add a new migration that updates the graph tables (nodes, channels and
policies) in preparation for the new columns required for V2
announcements. This migration has to be added to the set of "live"
migrations instead of "dev only" since it edits the columns of existing
tables and so changes the existing sql models. We are going to prep the
SQLStore code to handle the V2 types in the coming commits, so we need
this migration to be in place.

In this commit we also remove the TestSchemaMigrationIdempotency test
since this test fails with the new "ALTER TABLE" migrations which dont
have "IF NOT EXISTS" options like tables and indexes do. Migrations
should be idempotent anyways due to the migration tracker file and/or
the sqlc migration tracker.
This commit is contained in:
Elle Mouton committed 2026-02-13 07:21:20 +02:00
1 parent 2e58c07570
commit cb2fc6621e
6 files changed
+140 -158

No files matched your search

+5
View File
@@ -92,6 +92,11 @@ var (
// schema. This is optional and can be disabled by the
// user if necessary.
},
{
Name: "000009_graph_v2_columns",
Version: 11,
SchemaVersion: 9,
},
}, migrationAdditions...)
// ErrMigrationMismatch is returned when a migrated record does not