Skip to content

Commit

Permalink
fix: adjusted for gorm.io/driver/postgres v1.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
pilinux committed Feb 15, 2024
1 parent 6fa202f commit c8fe12b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 149 deletions.
2 changes: 1 addition & 1 deletion database/dbConnect.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func InitDB() *gorm.DB {
address += " port=" + port
}
dsn := address + " user=" + username + " dbname=" + database + " password=" + password + " sslmode=" + sslmode + " TimeZone=" + timeZone
sqlDB, err = sql.Open(driver, dsn)
sqlDB, err = sql.Open("pgx", dsn)
if err != nil {
log.WithError(err).Panic("panic code: 153")
}
Expand Down
11 changes: 3 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
go.mongodb.org/mongo-driver v1.14.0
golang.org/x/crypto v0.19.0
gorm.io/driver/mysql v1.5.4
gorm.io/driver/postgres v1.4.0
gorm.io/driver/postgres v1.5.6
gorm.io/driver/sqlite v1.5.5
gorm.io/gorm v1.25.7
)
Expand All @@ -40,20 +40,15 @@ require (
github.com/go-playground/validator/v10 v10.14.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.13.0 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.12.0 // indirect
github.com/jackc/pgx/v4 v4.17.2 // indirect
github.com/jackc/pgx/v5 v5.4.3 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
Expand Down
Loading

0 comments on commit c8fe12b

Please sign in to comment.