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 return err
} }
err = db.AutoMigrate(&APIKey{})
if err != nil {
return err
}
err = h.setValue("db_version", dbVersion) err = h.setValue("db_version", dbVersion)
return err return err