BREAKING CHANGE: V2 of thr SDK #12
@ -14,6 +14,7 @@ import (
|
|||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
gormPostgres "gorm.io/driver/postgres"
|
gormPostgres "gorm.io/driver/postgres"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
logger2 "gorm.io/gorm/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed migrations/*.sql
|
//go:embed migrations/*.sql
|
||||||
@ -42,7 +43,9 @@ func (p *postgresqlConnection) Connect(_ context.Context, endpoint string, usern
|
|||||||
|
|
||||||
log.Infof("OtterSpace: migration compleate")
|
log.Infof("OtterSpace: migration compleate")
|
||||||
|
|
||||||
db, err := gorm.Open(gormPostgres.Open(dsn), &gorm.Config{})
|
db, err := gorm.Open(gormPostgres.Open(dsn), &gorm.Config{
|
||||||
|
Logger: logger2.Default.LogMode(logger2.Silent),
|
||||||
|
})
|
||||||
p.db = db
|
p.db = db
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Reference in New Issue
Block a user