Replace database, initial setup now works

This commit is contained in:
viktorstrate
2020-11-28 21:49:33 +01:00
parent e42ac2436b
commit 31da5e1c07
10 changed files with 50 additions and 41 deletions

View File

@@ -6,10 +6,13 @@ import (
)
type SiteInfo struct {
Model
InitialSetup bool
PeriodicScanInterval int
ConcurrentWorkers int
InitialSetup bool `gorm:"not null"`
PeriodicScanInterval int `gorm:"not null"`
ConcurrentWorkers int `gorm:"not null"`
}
func (SiteInfo) TableName() string {
return "site_info"
}
// GetSiteInfo gets the site info row from the database, and creates it if it does not exist