diff

package
v0.0.0-...-15dca4e Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const LIST_SCHEMAS = "SELECT schema_name FROM information_schema.schemata WHERE NOT schema_name = ANY($1) ORDER BY schema_name"

Variables

This section is empty.

Functions

func ApplyMigrations

func ApplyMigrations(ctx context.Context, url string, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error

Applies local migration scripts to a database.

func BatchExecDDL

func BatchExecDDL(ctx context.Context, conn *pgx.Conn, sql io.Reader) error

func CreateShadowDatabase

func CreateShadowDatabase(ctx context.Context) (string, error)

func DiffDatabase

func DiffDatabase(ctx context.Context, schema []string, target string, w io.Writer, fsys afero.Fs, options ...func(*pgx.ConnConfig)) (string, error)

func DiffSchema

func DiffSchema(ctx context.Context, source, target string, schema []string, p utils.Program) (string, error)

func DiffSchemaMigra

func DiffSchemaMigra(ctx context.Context, source, target string, schema []string) (string, error)

Diffs local database schema against shadow, dumps output to stdout.

func LoadUserSchemas

func LoadUserSchemas(ctx context.Context, conn *pgx.Conn, exclude ...string) ([]string, error)

func MigrateDatabase

func MigrateDatabase(ctx context.Context, conn *pgx.Conn, fsys afero.Fs) error

func MigrateShadowDatabase

func MigrateShadowDatabase(ctx context.Context, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error

func Run

func Run(ctx context.Context, schema []string, file, password string, fsys afero.Fs) error

func RunMigra

func RunMigra(ctx context.Context, schema []string, file, password string, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error

func SaveDiff

func SaveDiff(out, file string, fsys afero.Fs) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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