db

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Host      string
	Port      int
	User      string
	Password  string
	Dbname    string
	Driver    string
	IsSilent  bool
	SSLConfig string
}

Database a structure for defining a database connection string.

func (Database) RunDown

func (d Database) RunDown(migration migrations.Migration, steps int)

RunDown Runs a down migration against a given database. migration - The migration to be ran. steps - the number of queries to perform against that migration. Example: If you have three down migrations, we'll call them 1.down.sql, 2.down.sql, and 3.down.sql

func (Database) RunUp

func (d Database) RunUp(migration migrations.Migration, steps int)

RunUp Runs an up migration against a given database.

func (Database) Verify

func (d Database) Verify(migration migrations.Migration)

Verify verifies that a given migration has been ran against a given database.

Jump to

Keyboard shortcuts

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