Add multi-server data model + legacy DB migration (step 0)
Adds Server.ID/Name, ServerInterface.Name, Client.ServerID, and a new ServerSetting type as additive fields so existing single-server code paths keep working unchanged. jsondb.Init() now detects a pre-existing single-server db/server/ layout and mirrors it into new servers/, server_settings/, server_hashes/ collections plus backfills ServerID on existing clients, without touching/removing the legacy files yet.
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
// Client model
|
||||
type Client struct {
|
||||
ID string `json:"id"`
|
||||
ServerID string `json:"server_id,omitempty"`
|
||||
PrivateKey string `json:"private_key"`
|
||||
PublicKey string `json:"public_key"`
|
||||
PresharedKey string `json:"preshared_key"`
|
||||
|
||||
Reference in New Issue
Block a user