Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a
pgroll latest
command to show the latest version in either the target database or a local directory of migration files.Documentation
pgroll latest
prints the latest schema version in either the target database or a local directory of migration files.By default,
pgroll latest
prints the latest version in the target database. Use the--local
flag to print the latest version in a local directory of migration files instead.In both cases, the
--with-schema
flag can be used to prefix the latest version with the schema name.Database
Assuming that the example migrations have been applied to the
public
schema in the target database, running:will print the latest version in the target database:
The exact output will vary as the
examples/
directory is updated.Local
Assuming that the example migrations are on disk in a directory called
examples
, running:will print the latest migration in the directory:
The exact output will vary as the
examples/
directory is updated.Part of #446