func main () {
ctx := context.Background()
conn, err := pgx.Connect(ctx, postgresConnectionURL)
if err != nil {
log.Fatal("failed to connect to postgres", err)
}
migrator := pgxmigrations.NewMigrator("/path/to/migrations", conn, pgxmigrations.WithLogging(true))
if err := migrator.Migrate(ctx); err != nil {
log.Fatal("failed to migrate postgres migrations", err)
}
}
go get -u github.com/samverrall/pgxmigrations@latest
Important: This package is currently in pre-release and is not recommended for production use.
This software is still in the early stages of development. While I strive to provide a stable and functional experience, there may be bugs, incomplete features, or breaking changes in future releases.
- Early Testing: Get a glimpse of the upcoming features and improvements.
- Community Feedback: I encourage users to provide feedback, report issues, and contribute to make this package better.
We welcome contributions from the community. If you encounter issues or have suggestions, please open an issue or submit a pull request.