chore: simplify db schema creation (#26693)
This commit is contained in:
parent
ad014333b2
commit
45741b1c90
11 changed files with 35 additions and 47 deletions
|
|
@ -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))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue