Skip to content

Commit

Permalink
add gorm session
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitoyama committed Dec 16, 2023
1 parent 879f2ff commit 5d81be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func EstablishConnection(isProduction bool) error {
}

func Migrate() (init bool, err error) {
m := gormigrate.New(db, gormigrate.DefaultOptions, Migrations())
m := gormigrate.New(db.Session(&gorm.Session{}), gormigrate.DefaultOptions, Migrations())

m.InitSchema(func(db *gorm.DB) error {
init = true
Expand Down

0 comments on commit 5d81be9

Please sign in to comment.