sqldb: define schemas for all graph node tables

In this commit, the various SQL schemas required to store graph node
related data is defined. Specifically, the following tables are defined:

- nodes
- node_extra_types
- node_features
- node_addresses
This commit is contained in:
Elle Mouton
2025-05-14 16:23:01 +02:00
parent 93a6ab8759
commit ffbe4f6ffc
5 changed files with 136 additions and 1 deletions

View File

@@ -102,3 +102,31 @@ type MigrationTracker struct {
Version int32
MigrationTime time.Time
}
type Node struct {
ID int64
Version int16
PubKey []byte
Alias sql.NullString
LastUpdate sql.NullInt64
Color sql.NullString
Signature []byte
}
type NodeAddress struct {
NodeID int64
Type int16
Position int32
Address string
}
type NodeExtraType struct {
NodeID int64
Type int64
Value []byte
}
type NodeFeature struct {
NodeID int64
FeatureBit int32
}