reverted pgx changes

This commit is contained in:
2021-10-21 19:46:23 +02:00
parent 18282afcf6
commit 09571fc447

View File

@@ -9,6 +9,7 @@ import (
"csgowtfd/ent/player"
"csgowtfd/ent/stats"
"csgowtfd/utils"
"entgo.io/ent/dialect"
"entgo.io/ent/dialect/sql"
"flag"
"fmt"
@@ -722,7 +723,8 @@ func main() {
log.Fatalf("Failed to open database %s: %v", conf.Db.ConnectTo, err)
}
db.Client = ent.NewClient(ent.Driver(pdb))
drv := sql.OpenDB(dialect.Postgres, pdb.DB())
db.Client = ent.NewClient(ent.Driver(drv))
} else {
db.Client, err = ent.Open(conf.Db.Driver, conf.Db.ConnectTo)
if err != nil {