1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00

Add migration for new data model

This commit is contained in:
Kristoffer Dalby 2022-01-25 22:11:05 +00:00
parent 9dc20580c7
commit 70d82ea184

5
db.go
View File

@ -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