feta/db/dbmodel.go

16 lines
316 B
Go
Raw Normal View History

2019-12-19 14:24:26 +00:00
package db
2019-11-06 07:03:42 +00:00
import "git.eeqj.de/sneak/feta/process"
2019-11-06 07:03:42 +00:00
import "github.com/jinzhu/gorm"
import _ "github.com/jinzhu/gorm/dialects/sqlite" // required for orm
2019-11-06 07:03:42 +00:00
type savedInstance struct {
2019-11-06 07:03:42 +00:00
gorm.Model
hostname string
software string
}
2019-12-19 14:24:26 +00:00
func (f *process.Feta) databaseMigrations() {
f.db.AutoMigrate(&savedInstance{})
2019-11-06 07:03:42 +00:00
}