sqldb: switch away from pq to pgx for Postgres

Completely switch to the better maintained pgx driver.
This commit is contained in:
Andras Banki-Horvath
2024-07-03 08:32:48 +02:00
parent 95b99420fa
commit d0c1cec8c1
6 changed files with 22 additions and 11 deletions

View File

@@ -13,7 +13,7 @@ import (
"testing"
"time"
_ "github.com/lib/pq" // Import the postgres driver.
_ "github.com/jackc/pgx/v5"
"github.com/ory/dockertest/v3"
"github.com/ory/dockertest/v3/docker"
"github.com/stretchr/testify/require"
@@ -91,7 +91,7 @@ func NewTestPgFixture(t *testing.T, expiry time.Duration) *TestPgFixture {
var testDB *sql.DB
err = pool.Retry(func() error {
testDB, err = sql.Open("postgres", databaseURL)
testDB, err = sql.Open("pgx", databaseURL)
if err != nil {
return err
}