diff --git a/database/db.go b/database/db.go index c9b5096..52610dc 100644 --- a/database/db.go +++ b/database/db.go @@ -40,7 +40,7 @@ func (r *DB) Connection(name string) database.DB { return r } - db, err := sqlx.Open("mysql", dsn) + db, err := sqlx.Open("mysql", dsn, name) if err != nil { log.Error().Err(err).Msg("database open error: %v") return r diff --git a/go.mod b/go.mod index b2ae1c4..c3d3fd6 100644 --- a/go.mod +++ b/go.mod @@ -15,12 +15,12 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/h2non/filetype v1.1.3 github.com/oarkflow/cron v0.0.3 - github.com/oarkflow/frame v0.0.65 + github.com/oarkflow/frame v0.0.66 github.com/oarkflow/log v1.0.74 github.com/oarkflow/machinery v0.0.3 github.com/oarkflow/migration v0.0.5 - github.com/oarkflow/pkg v0.1.31 - github.com/oarkflow/squealx v0.0.7 + github.com/oarkflow/pkg v0.1.42 + github.com/oarkflow/squealx v0.0.12 github.com/opentracing/opentracing-go v1.2.0 github.com/pkg/errors v0.9.1 github.com/redis/go-redis/v9 v9.5.1 @@ -33,7 +33,7 @@ require ( gorm.io/driver/mysql v1.5.4 gorm.io/driver/postgres v1.5.7 gorm.io/driver/sqlserver v1.5.3 - gorm.io/gorm v1.25.7 + gorm.io/gorm v1.25.8 ) require ( @@ -60,7 +60,7 @@ require ( github.com/aws/smithy-go v1.20.1 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect github.com/bytedance/go-tagexpr/v2 v2.9.11 // indirect - github.com/bytedance/gopkg v0.0.0-20240202110943-5e26950c5e57 // indirect + github.com/bytedance/gopkg v0.0.0-20240315062850-21fc7a1671a8 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/clbanning/mxj v1.8.4 // indirect github.com/cloudwego/netpoll v0.6.0 // indirect @@ -74,7 +74,7 @@ require ( github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-redsync/redsync/v4 v4.8.1 // indirect - github.com/go-sql-driver/mysql v1.7.1 // indirect + github.com/go-sql-driver/mysql v1.8.1 // indirect github.com/go-test/deep v1.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect @@ -99,7 +99,7 @@ require ( github.com/imdario/mergo v0.3.14 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect - github.com/jackc/pgx/v5 v5.5.3 // indirect + github.com/jackc/pgx/v5 v5.5.5 // indirect github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect @@ -119,7 +119,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/montanaflynn/stats v0.7.1 // indirect github.com/mozillazg/go-httpheader v0.2.1 // indirect - github.com/nyaruka/phonenumbers v1.3.2 // indirect + github.com/nyaruka/phonenumbers v1.3.4 // indirect github.com/oarkflow/amqp v0.0.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect @@ -153,10 +153,10 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sync v0.6.0 // indirect + golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect