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

[Feature request] Programatic migration #539

Closed
nexovec opened this issue Aug 20, 2024 · 3 comments
Closed

[Feature request] Programatic migration #539

nexovec opened this issue Aug 20, 2024 · 3 comments

Comments

@nexovec
Copy link

nexovec commented Aug 20, 2024

Hi,
I'd really like a way to do river migrate-up programatically in go. This would allow me to smoothly react to failing migrations and have more control over the process. There is currently no mention of this in the docs, but maybe it's already possible, since the CLI can do it?

@nexovec
Copy link
Author

nexovec commented Aug 20, 2024

I know I can just fork the process, but that's really ugly.

@nexovec
Copy link
Author

nexovec commented Aug 20, 2024

This was partially motivated by river CLI somehow failing to install

go install github.com/riverqueue/river/cmd/river@latest
# github.com/riverqueue/river
/root/go/pkg/mod/github.com/riverqueue/river@v0.11.3/client.go:481:27: undefined: baseservice.NewArchetype
/root/go/pkg/mod/github.com/riverqueue/river@v0.11.3/client.go:659:30: c.baseStartStop.StoppedUnsafe undefined (type startstop.BaseStartStop has no field or method StoppedUnsafe)
/root/go/pkg/mod/github.com/riverqueue/river@v0.11.3/client.go:720:23: undefined: startstop.StartAll

(Issue #538 )

@brandur
Copy link
Contributor

brandur commented Aug 20, 2024

Check out the Go migrations API:

https://riverqueue.com/docs/migrations#go-migration-api

@brandur brandur closed this as completed Aug 20, 2024
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

2 participants