versioner

command module
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: BSD-2-Clause Imports: 6 Imported by: 0

README

Versioner

go-doc go-report license

versioner-logo

PostgreSQL schema versioning tool.

Requirements

Installation

In order to install versioner, follow these steps after cloning the repository.

make install

To uninstall the binary, run

make uninstall

The versioner binary will be installed in your $GOPATH/bin directory.

Usage

The versioner CLI tool provides comprehensive menu where all commands and options can be reviewed. To show the help menu, run

versioner --help

To print the menus of the sub commands use:

versioner [options] <command> [options] <sub-command> --help

Autocompletion

Enabling 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.

Docker

The versioner tool can also be generated as a Docker image. To build image use

make docker
Docker Image Usage

The following is an example of how to use the versioner Docker image to run its commands

docker run --rm versioner --help

Use 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.localhost for macOS
  • docker.for.win.localhost for Windows
Docker Requirements
docker pull golang:1.13.0
docker pull busybox:1.31.1

Contact

Direct questions or issue to stoyan.a.vitanov@gmail.com or open GitHub issue right away.

License

Copyright © 2020 Versioner

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package client provides types and utilities used for interacting with a remote database.
Package client provides types and utilities used for interacting with a remote database.
Package cmd provides CLI commands implementations.
Package cmd provides CLI commands implementations.
Package config provides types and functions used for specifying the tool settings.
Package config provides types and functions used for specifying the tool settings.
Package version provides variables used for tracking the project version.
Package version provides variables used for tracking the project version.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL