mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Add migration for new data model
This commit is contained in:
parent
9dc20580c7
commit
70d82ea184
1 changed files with 5 additions and 0 deletions
5
db.go
5
db.go
|
@ -58,6 +58,11 @@ func (h *Headscale) initDB() error {
|
|||
return err
|
||||
}
|
||||
|
||||
err = db.AutoMigrate(&APIKey{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = h.setValue("db_version", dbVersion)
|
||||
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue