Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release with version using pgx v5? #66

Closed
henvic opened this issue Sep 21, 2022 · 11 comments
Closed

New release with version using pgx v5? #66

henvic opened this issue Sep 21, 2022 · 11 comments

Comments

@henvic
Copy link

henvic commented Sep 21, 2022

Hi @jackc,

Any plans on releasing a new version soon? Thanks!

btw, I've tested it on my project (using the API rather than the CLI), and it worked fine!

@lzap
Copy link
Contributor

lzap commented Sep 23, 2022

This is a big issue for project using stdlib, I am getting an error "panic: sql: Register called twice for driver pgx" because obviously I cannot use stdlib/v4 and stdlib/v5 in a single binary. Unfortunately, we are still on the sqlx extension and we have to use:

	wrapErr := stdConn.Raw(func(pgxConn interface{}) error {
		conn := pgxConn.(*stdlib.Conn).Conn()
		opts := migrate.MigratorOptions{
			MigratorFS: NewEmbeddedFS(&embeddedMigrations),
		}
		table := fmt.Sprintf("%s.schema_version", schema)
		migrator, err := migrate.NewMigratorEx(ctx, conn, table, &opts)

Many thanks! Appreciate the great work you do for the pgx community.

@jackc
Copy link
Owner

jackc commented Sep 24, 2022

You can use the v2-dev branch for pgx v5 compatibility.

I don't anticipate any significant changes before the v2 release, but I want review the tern interface once more before a release. It may be a little while before I get to it though.

@lzap
Copy link
Contributor

lzap commented Sep 30, 2022

For googlers: Unfortunately, it is not possible to work with branches in Go modules directly, go get github.com/jackc/tern@v2-dev will install the stuff but you cannot use it until there is an actual release. In case you need this NOW, feel free to add this to your go.mod file:

// REMOVED read on in the thread
//replace github.com/jackc/tern => github.com/lzap/tern2 main

Ping me on github if you need me to push into the main branch when there is new work. There are no changes, it's just a clone of the v2-dev branch from @jackc. My account is safe, I do use 2FA. Or make your own fork or local copy of the branch.

@jackc jackc pinned this issue Oct 1, 2022
@jackc
Copy link
Owner

jackc commented Oct 1, 2022

I just pinned this issue to the top so it gets more attention and tagged v2.0.0-beta.1 to make it easier for people to test. Sorry, I hadn't realized that using code from a branch was inconvenient.

As mentioned above, there aren't any planned changes before final release, but more testing and feedback would be great.

@lzap
Copy link
Contributor

lzap commented Oct 3, 2022

Thanks, there is one more little detail which prevents us from using the tag and that is: #69

Other than that, I believe it should work.

@jackc
Copy link
Owner

jackc commented Oct 3, 2022

Just tagged v2.0.0-beta.2 with the import path fixes.

@lzap
Copy link
Contributor

lzap commented Oct 3, 2022

Thanks.

Googlers: to try the new v2 beta version, do this:

go mod tidy
go get github.com/jackc/tern/v2@v2.0.0-beta.2

And you are all set!

@BuJo
Copy link

BuJo commented Jan 10, 2023

tern seems to be working like before. 👍
(I have more problems with pgx 5 around Time so I can't update yet, but still wanted to report back.)

I really like the API changes around LoadMigrations using a FS, before I had to create my own "migration filesystem".

@jackc
Copy link
Owner

jackc commented Feb 24, 2023

Finally released v2.0.0. No significant changes since v2.0.0-beta.3

@meshenka
Copy link

@jackc 🙏 new release tag with this commit e066eba

@jackc
Copy link
Owner

jackc commented May 17, 2024

@meshenka Just release v2.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants