diff --git a/management/server/peer/peer.go b/management/server/peer/peer.go index e5475c07d..1b5804bd0 100644 --- a/management/server/peer/peer.go +++ b/management/server/peer/peer.go @@ -25,7 +25,7 @@ type Peer struct { // AccountID is a reference to Account that this object belongs AccountID string `json:"-" gorm:"index"` // WireGuard public key - Key string // uniqueness index (check migrations) + Key string `gorm:"size:255;uniqueIndex"` // IP address of the Peer IP netip.Addr `gorm:"serializer:json"` // uniqueness index per accountID (check migrations) // IPv6 overlay address of the Peer, zero value if IPv6 is not enabled for the account.