fix sql store

This commit is contained in:
Pascal Fischer 2023-11-30 11:51:35 +01:00
parent 47c44d4b87
commit 4bf574037f
2 changed files with 3 additions and 2 deletions

View File

@ -164,7 +164,7 @@ type Settings struct {
JWTGroupsClaimName string
// Extra is a dictionary of Account settings
Extra *account.ExtraSettings
Extra *account.ExtraSettings `gorm:"embedded;embeddedPrefix:extra_"`
}
// Copy copies the Settings struct

View File

@ -14,6 +14,7 @@ import (
"gorm.io/gorm/logger"
nbdns "github.com/netbirdio/netbird/dns"
"github.com/netbirdio/netbird/management/server/account"
nbpeer "github.com/netbirdio/netbird/management/server/peer"
"github.com/netbirdio/netbird/management/server/status"
"github.com/netbirdio/netbird/management/server/telemetry"
@ -62,7 +63,7 @@ func NewSqliteStore(dataDir string, metrics telemetry.AppMetrics) (*SqliteStore,
err = db.AutoMigrate(
&SetupKey{}, &nbpeer.Peer{}, &User{}, &PersonalAccessToken{}, &Group{}, &Rule{},
&Account{}, &Policy{}, &PolicyRule{}, &route.Route{}, &nbdns.NameServerGroup{},
&installation{},
&installation{}, &account.ExtraSettings{},
)
if err != nil {
return nil, err