Skip to content

Commit

Permalink
Migrate namespace_id to user_id column in machine and pak
Browse files Browse the repository at this point in the history
Signed-off-by: Kristoffer Dalby <[email protected]>
  • Loading branch information
kradalby committed Jan 26, 2023
1 parent 8dadb04 commit 6d669c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func (h *Headscale) initDB() error {
return err
}

_ = db.Migrator().RenameColumn(&Machine{}, "namespace_id", "user_id")
_ = db.Migrator().RenameColumn(&PreAuthKey{}, "namespace_id", "user_id")

_ = db.Migrator().RenameColumn(&Machine{}, "ip_address", "ip_addresses")
_ = db.Migrator().RenameColumn(&Machine{}, "name", "hostname")

Expand Down

0 comments on commit 6d669c6

Please sign in to comment.