CLI-friendly package for pg migrations management.

GolangCI Version Go Report Card Coverage Status Go Reference Mentioned in Awesome Go

go-pg-migrate

CLI-friendly package for PostgreSQL migrations management.

Installation

Requires Go Modules enabled.

go get github.com/lawzava/go-pg-migrate/v2

Usage

Initialize the migrate with options payload where choices are:

  • DatabaseURI database connection string. In a format of postgres://user:password@host:port/database?sslmode=disable.

  • VersionNumberToApply uint value of a migration number up to which the migrations should be applied. When the requested migration number is lower than currently applied migration number it will run backward migrations, otherwise it will run forward migrations.

  • PrintVersionAndExit if true, the currently applied version number will be printed into stdout and the migrations will not be applied.

  • ForceVersionWithoutMigrations if true, the migrations will not be applied, but they will be registered as applied up to the specified version number.

  • RefreshSchema if true, public schema will be dropped and recreated before the migrations are applied. Useful for frequent testing and CI environments.

Example

You will find the example in examples directory. The example is CLI-friendly and can be used as a base for CLI-based migrations utility.

Similar Resources

Go-file-downloader-ftctl - A file downloader cli built using golang. Makes use of cobra for building the cli and go concurrent feature to download files.

ftctl This is a file downloader cli written in Golang which uses the concurrent feature of go to download files. The cli is built using cobra. How to

Jan 2, 2022

Cli-algorithm - A cli program with A&DS in go!

cli-algorithm Objectives The objective of this cli is to implement 4 basic algorithms to sort arrays been Merge Sort Insertion Sort Bubble Sort Quick

Jan 2, 2022

Nebulant-cli - Nebulant's CLI

Nebulant-cli - Nebulant's CLI

Nebulant CLI Website: https://nebulant.io Documentation: https://nebulant.io/docs.html The Nebulant CLI tool is a single binary that can be used as a

Jan 11, 2022

News-parser-cli - Simple CLI which allows you to receive news depending on the parameters passed to it

News-parser-cli - Simple CLI which allows you to receive news depending on the parameters passed to it

news-parser-cli Simple CLI which allows you to receive news depending on the par

Jan 4, 2022

Go-api-cli - Small CLI to fetch data from an API sync and async

Async API Cli CLI to fetch data on "todos" from a given API in a number of ways.

Jan 13, 2022

Syno-cli - Synology unofficial API CLI and library

Synology CLI Unofficial wrapper over Synology API in Go. Focus on administrative

Jan 6, 2023

Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Jan 12, 2022

bcrypt-cli is the CLI tool for hashing passwords with bcrypt.

bcrypt-cli bcrypt-cli is the CLI tool for hashing passwords with bcrypt. Install go install github.com/ryicoh/bcrypt-cli Usage It can be used like bas

Jan 9, 2023
🚀 goprobe is a promising command line tool for inspecting URLs with modern and user-friendly way.

goprobe Build go build -o ./bin/goprobe Example > goprobe https://github.com/gaitr/goprobe > cat links.txt | goprobe > echo "https://github.com/gaitr/

Oct 24, 2021
Zenstring - Randomly generated, friendly & zen strings for your app

zenstring Randomly generated, friendly & zen strings for your app. Started as a

Feb 3, 2022
a work time management CLI tool for any platform
a work time management CLI tool for any platform

english |日本語 jobgosh | job management tool made with golang for shell a multi-platform work time management CLI tool to track and improve your day to

May 16, 2022
tfacon is a CLI tool for connecting Test Management Platforms and Test Failure Analysis Classifier.

Test Failure Classifier Connector Description tfacon is a CLI tool for connecting Test Management Platforms and Test Failure Analysis Classifier. Test

Jun 23, 2022
Go library and CLI utility for /etc/hosts management.
Go library and CLI utility for /etc/hosts management.

Etc Hosts Management Utility & Go Library /etc/hosts Management It is easy to open your /etc/hosts file in text editor and add or remove entries. Howe

Nov 27, 2022
Google KMS backed Solana key management CLI tool

solana-kms solana-kms is a Google KMS backed Solana token management CLI utility. The main purpose of the tool is to ensure that the private key is ne

Jan 13, 2022
Elegant CLI wrapper for kubeseal CLI

Overview This is a wrapper CLI ofkubeseal CLI, specifically the raw mode. If you just need to encrypt your secret on RAW mode, this CLI will be the ea

Jan 8, 2022
CLI to run a docker image with R. CLI built using cobra library in go.
CLI  to run a docker image with R. CLI built using cobra library in go.

BlueBeak Installation Guide Task 1: Building the CLI The directory structure looks like Fastest process: 1)cd into bbtools 2)cd into bbtools/bin 3)I h

Dec 20, 2021
A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode.

aliyun-dns A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode. Installation Install aliyun-cli. Usage $ aliyun-dns -h A wra

Dec 21, 2021
Symfony-cli - The Symfony CLI tool For Golang

Symfony CLI Install To install Symfony CLI, please download the appropriate vers

Dec 28, 2022