mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Migrate DB: rename namespace, automigrate user
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
da5c051d73
commit
5da0963aac
1 changed files with 3 additions and 1 deletions
4
db.go
4
db.go
|
@ -187,7 +187,9 @@ func (h *Headscale) initDB() error {
|
|||
return err
|
||||
}
|
||||
|
||||
err = db.AutoMigrate(&Namespace{})
|
||||
_ = db.Migrator().RenameTable("Namespace", "User")
|
||||
|
||||
err = db.AutoMigrate(&User{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue