Skip to content

Add a pgroll latest url subcommand #900

@andrew-farries

Description

@andrew-farries

Add a new url subcommand to pgroll latest that returns a Postgres connection string with the latest version schema name set via the options query parameter in the connection string URL.

This would make it easier to integrate pgroll into application deployments and remove the need to manually construct a connection string from the output of pgroll latest schema.

Example usage

Assuming that the most recently started migration is 02_some_migration:

$ pgroll latest url

postgres://postgres:postgres@localhost:5432?options=-c%20search_path%3Dpublic_02_some_migration

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions