pgxmgr

package module
v0.0.0-...-7bfdc48 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: MIT Imports: 7 Imported by: 0

README

pgxmgr

SQL migration tool, build on top the pgq Postgresql driver.

Documentation

Overview

Package pgxmgr loads and executes the migration scripts on a connection aquired from a pgx pool. All migrations are run incrementaly in seperate transaction blocks. Execution is terminated when ay migration fails and a rollback is performed to the beginning of this failing migration. Any previous migrations will already be committed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(db *dotpgx.DB, path string) (err error)

Run loads and executes the migrations. The first argument needs to be an instance of a configured pgx connection pool. The second argument should be directory where the migration files are loaded from. Files with the signature of ##-##-####-<name>.sql will be loaded and executed in order. The three number groups stand for major, minor and fix version.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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