Skip to content

Commit

Permalink
Migrate mysql db to postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sumi-k committed Oct 6, 2023
1 parent cb8f97e commit 46fba92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewSql() *sqlx.DB {
name = "postgres"
}

db = sqlx.MustConnect("postgres", "postgres://"+username+":"+password+"@"+host+":"+port+"?sslmode=require")
db = sqlx.MustConnect("postgres", "postgres://"+username+":"+password+"@"+host+":"+port+"?sslmode=disabled")

db.Mapper = reflectx.NewMapperFunc("json", strings.ToLower)
db.SetConnMaxLifetime(time.Minute * 1)
Expand Down

0 comments on commit 46fba92

Please sign in to comment.