jackc / tern

The SQL Fan's Migrator
MIT License
925 stars 68 forks source link

Tern uses out of date version of pgx #13

Closed samgensburg closed 4 years ago

samgensburg commented 4 years ago

Tern is currently using v3 of pgx. This is mostly a problem because it makes it impossible to use the migrate library in conjunction with an up to date version of pgx. Is there any reason not to quickly update this to v4?

jackc commented 4 years ago

No reason not to upgrade it to v4. Just a issue of spending the time.

samgensburg commented 4 years ago

Do you have any advice on getting tests to pass locally? I was going to submit a PR, but none of the tests are passing even after I thought I had set up the config and settings files

jackc commented 4 years ago

Not sure what to say beyond what the README.md says about running tests.

But here are my config files for the tests:

migrate/connection_settings_test.go

package migrate_test

import (
    "github.com/jackc/pgx"
)

var defaultConnectionParameters *pgx.ConnConfig = &pgx.ConnConfig{
    Host:     "/private/tmp",
    Database: "tern_migrate_test",
}

testdata/tern.conf

[database]
# host is required (network host or path to Unix domain socket)
host = /private/tmp
# port = 5432
# database is required
database = tern_test
# user defaults to OS user
# user =
# version_table = schema_version

[data]
# Any fields in the data section are available in migration templates
# prefix = foo
jackc commented 4 years ago

Merged #14 that should resolve this.