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:
6 files changed
+140
-158
No files matched your search
+13
-7
@@ -42,6 +42,9 @@ type GraphChannel struct {
|
||||
Node2Signature []byte
|
||||
Bitcoin1Signature []byte
|
||||
Bitcoin2Signature []byte
|
||||
Signature []byte
|
||||
FundingPkScript []byte
|
||||
MerkleRootHash []byte
|
||||
}
|
||||
|
||||
type GraphChannelExtraType struct {
|
||||
@@ -72,6 +75,8 @@ type GraphChannelPolicy struct {
|
||||
MessageFlags sql.NullInt16
|
||||
ChannelFlags sql.NullInt16
|
||||
Signature []byte
|
||||
BlockHeight sql.NullInt64
|
||||
DisableFlags sql.NullInt16
|
||||
}
|
||||
|
||||
type GraphChannelPolicyExtraType struct {
|
||||
@@ -85,13 +90,14 @@ type GraphClosedScid struct {
|
||||
}
|
||||
|
||||
type GraphNode struct {
|
||||
ID int64
|
||||
Version int16
|
||||
PubKey []byte
|
||||
Alias sql.NullString
|
||||
LastUpdate sql.NullInt64
|
||||
Color sql.NullString
|
||||
Signature []byte
|
||||
ID int64
|
||||
Version int16
|
||||
PubKey []byte
|
||||
Alias sql.NullString
|
||||
LastUpdate sql.NullInt64
|
||||
Color sql.NullString
|
||||
Signature []byte
|
||||
BlockHeight sql.NullInt64
|
||||
}
|
||||
|
||||
type GraphNodeAddress struct {
|
||||
|
||||
Reference in new issue
Block a user