datamigration

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PGURL  *url.URL
	Path   string
	Logger logger.Logger
}

NOTE (TC): These are IAM V2 specific data migrations. DO NOT APPLY ANY SCHEMA CHANGES HERE! Read more in v2_data_migrations.md.

Config holds the information needed to connect to the database (PGURL), to find the migration SQL files (Path), and log debug messages (Logger).

func (*Config) Migrate

func (c *Config) Migrate() error

Migrate executes all migrations we have

func (*Config) Reset

func (c *Config) Reset() error

Reset will drop the current state of the migration database. We don't need to reverse migrate since on reset we are just dropping the whole database.

Jump to

Keyboard shortcuts

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