mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-14 17:14:45 +08:00
fix(go): migration nodes creation failure;
This commit is contained in:
parent
0a6bdf5ace
commit
fc58ee27c6
2 changed files with 3 additions and 1 deletions
2
main.go
2
main.go
|
@ -121,7 +121,7 @@ func initialize() { // Client Mode Prereq Check
|
|||
migrate.Run()
|
||||
err = migrate.ToSQLSchema()
|
||||
if err != nil {
|
||||
logger.FatalLog("error migrating to SQL schema: ", err.Error())
|
||||
logger.FatalLog("error migrating to SQL schema:", err.Error())
|
||||
}
|
||||
|
||||
logic.SetJWTSecret()
|
||||
|
|
|
@ -110,6 +110,8 @@ func migrateHosts(ctx context.Context) error {
|
|||
}
|
||||
|
||||
_host := converters.ToSchemaHost(host)
|
||||
// skip nodes creation, it will be done later.
|
||||
_host.Nodes = []schema.Node{}
|
||||
err = _host.Create(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Reference in a new issue