PostgreSQL schema versioning tool.
In order to install versioner, follow these steps after
cloning the repository.
make installTo uninstall the binary, run
make uninstallThe versioner binary will be installed in your $GOPATH/bin directory.
The versioner CLI tool provides comprehensive menu where all commands and options can be reviewed. To show the help menu, run
versioner --helpTo print the menus of the sub commands use:
versioner [options] <command> [options] <sub-command> --helpEnabling the autocompletion capabilities happens by exposing PROG environment variable and
sourcing dedicated completion script, located in autocompletion/ directory of the project.
-
BASH
PROG=./bin/versioner source ./autocomplete/bash_autocomplete -
ZSH
PROG=./bin/versioner _CLI_ZSH_AUTOCOMPLETE_HACK=1 source ./autocomplete/zsh_autocomplete
For more detailed overview of the autocompletion scripts see the official documentation.
The versioner tool can also be generated as a Docker image. To build image use
make dockerThe following is an example of how to use the versioner Docker image to run its commands
docker run --rm versioner --helpUse the following template to create new database:
docker run --rm versioner \
--endpoint <remote> \
--port <remote-port> \
--database <database> \
--username <username-credential> \
--password <password-credential> \
--sslmode <postgres-ssl-mode> \
database create \
--name <database-name>To remove already existing database, replace create with drop.
In case your Postgres server runs on localhost and your OS of choice is macOS or Windows, replace <remote> with:
docker.for.mac.localhostfor macOSdocker.for.win.localhostfor Windows
- Go Docker Image v1.13.0 at least.
docker pull golang:1.13.0- BusyBox Docker Image v1.31.1 at least.
docker pull busybox:1.31.1Direct questions or issue to stoyan.a.vitanov@gmail.com or open GitHub issue right away.
Copyright © 2020 Versioner
