migrations

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MigrationsToPerform policyServerMigrations = policyServerMigrations{
	policyServerMigration{
		"1",
		migration_v0001,
	},
	policyServerMigration{
		"2",
		migration_v0002,
	},
}

Functions

This section is empty.

Types

type MigrateAdapter

type MigrateAdapter struct {
}

func (*MigrateAdapter) ExecMax

func (ma *MigrateAdapter) ExecMax(db MigrationDb, dialect string, m migrate.MigrationSource, dir migrate.MigrationDirection, max int) (int, error)

type MigrationDb

type MigrationDb interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
	Query(query string, args ...interface{}) (*sql.Rows, error)
	QueryRow(query string, args ...interface{}) *sql.Row
	DriverName() string
}

type Migrator

type Migrator struct {
	MigrateAdapter migrateAdapter
}

func (*Migrator) PerformMigrations

func (m *Migrator) PerformMigrations(driverName string, migrationDb MigrationDb, maxNumMigrations int) (int, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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