chore: simplify db schema creation (#26693)

This commit is contained in:
andig 2026-01-14 14:43:01 +01:00 • committed by GitHub
parent ad014333b2
commit 45741b1c90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 35 additions and 47 deletions

View file

@ -4,11 +4,12 @@ import (
"time"
"github.com/evcc-io/evcc/server/db"
"gorm.io/gorm"
)
func init() {
db.Register(func() error {
return db.Instance.AutoMigrate(new(GridSession))
db.Register(func(db *gorm.DB) error {
return db.AutoMigrate(new(GridSession))
})
}