add state history

This commit is contained in:
Fran Jurmanović
2025-05-27 20:18:58 +02:00
parent e52894c663
commit 56ef5e1484
12 changed files with 173 additions and 27 deletions

View File

@@ -55,6 +55,10 @@ func Migrate(db *gorm.DB) {
if err != nil {
panic("failed to migrate model.SessionType")
}
err = db.AutoMigrate(&model.StateHistory{})
if err != nil {
panic("failed to migrate model.StateHistory")
}
db.FirstOrCreate(&model.ApiModel{Api: "Works"})
Seed(db)