...

Package redshift

import "github.com/golang-migrate/migrate/v4/database/redshift"
Overview
Index

Overview ▾

Variables

var (
    ErrNilConfig      = fmt.Errorf("no config")
    ErrNoDatabaseName = fmt.Errorf("no database name")
)
var DefaultMigrationsTable = "schema_migrations"

func WithInstance

func WithInstance(instance *sql.DB, config *Config) (database.Driver, error)

type Config

type Config struct {
    MigrationsTable string
    DatabaseName    string
}

type Redshift

type Redshift struct {
    // contains filtered or unexported fields
}

func (*Redshift) Close

func (p *Redshift) Close() error

func (*Redshift) Drop

func (p *Redshift) Drop() (err error)

func (*Redshift) Lock

func (p *Redshift) Lock() error

Redshift does not support advisory lock functions: https://docs.aws.amazon.com/redshift/latest/dg/c_unsupported-postgresql-functions.html

func (*Redshift) Open

func (p *Redshift) Open(url string) (database.Driver, error)

func (*Redshift) Run

func (p *Redshift) Run(migration io.Reader) error

func (*Redshift) SetVersion

func (p *Redshift) SetVersion(version int, dirty bool) error

func (*Redshift) Unlock

func (p *Redshift) Unlock() error

func (*Redshift) Version

func (p *Redshift) Version() (version int, dirty bool, err error)