Initial multi-user support using namespaces

This commit is contained in:
Juan Font Alonso 2021-02-28 00:58:09 +01:00
parent 562e996996
commit b7655b1f68
6 changed files with 229 additions and 41 deletions

1
db.go
View file

@ -23,6 +23,7 @@ func (h *Headscale) initDB() error {
db.Exec("create extension if not exists \"uuid-ossp\";")
db.AutoMigrate(&Machine{})
db.AutoMigrate(&KV{})
db.AutoMigrate(&Namespace{})
db.Close()
h.setValue("db_version", dbVersion)