migrate

package
v0.0.0-...-1a32bef Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package migrate provides simple and flexible ScyllaDB and Apache Cassandra® migrations. Migrations can be read from a flat directory containing cql files. There is no imposed naming schema, migration name is file name and the migrations are processed in lexicographical order. Caller provides a gocql.Session, the session must use a desired keyspace as migrate would try to create migrations table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(ctx context.Context, session *gocql.Session, dir string) error

Migrate reads the cql files from a directory and applies required migrations.

Types

type Info

type Info struct {
	Name      string
	Checksum  string
	Done      int
	StartTime time.Time
	EndTime   time.Time
}

Info contains information on migration applied on a database.

func List

func List(ctx context.Context, session *gocql.Session) ([]*Info, error)

List provides a listing of applied migrations.

Jump to

Keyboard shortcuts

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