fixture

package
v0.0.0-...-970f38b Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MigrationsList = &migration.MigrationsList{
	1: migration.Migration{
		ID:   1,
		Name: "first_migration",
		Up:   "CREATE TABLE IF NOT EXISTS public.test01(id int4)",
		Down: "DROP TABLE public.test01",
	},
	2: migration.Migration{
		ID:   2,
		Name: "second_migration",
		Up:   "CREATE TABLE IF NOT EXISTS public.test02(id int4)",
		Down: "DROP TABLE public.test02",
	},
	3: migration.Migration{
		ID:   3,
		Name: "third_migration",
		Up: migration.Func(func(tx *sqlx.Tx) error {
			_, err := tx.Exec("CREATE TABLE IF NOT EXISTS public.test03(id int4)")
			return err
		}),
		Down: migration.Func(func(tx *sqlx.Tx) error {
			_, err := tx.Exec("DROP TABLE public.test03")
			return err
		}),
	},
}

MigrationsList fixture

View Source
var MigrationsLogsList = &migration.LogsList{
	1: migration.Log{
		ID:     1,
		Status: migration.StatusApplied,
		Name:   "first_migration",
		Time:   time.Now(),
	},
	2: migration.Log{
		ID:     2,
		Status: migration.StatusError,
		Name:   "second_migration",
		Time:   time.Now(),
	},
}

MigrationsLogsList fixture

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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