Documentation ¶
Index ¶
- Constants
- func ApplyMigrations(ctx context.Context, url string, fsys afero.Fs, ...) error
- func BatchExecDDL(ctx context.Context, conn *pgx.Conn, sql io.Reader) error
- func CreateShadowDatabase(ctx context.Context) (string, error)
- func DiffDatabase(ctx context.Context, schema []string, config pgconn.Config, w io.Writer, ...) (string, error)
- func DiffSchema(ctx context.Context, source, target string, schema []string, p utils.Program) (string, error)
- func DiffSchemaMigra(ctx context.Context, source, target string, schema []string) (string, error)
- func LoadUserSchemas(ctx context.Context, conn *pgx.Conn, exclude ...string) ([]string, error)
- func MigrateDatabase(ctx context.Context, conn *pgx.Conn, fsys afero.Fs) error
- func MigrateShadowDatabase(ctx context.Context, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error
- func Run(ctx context.Context, schema []string, file string, config pgconn.Config, ...) error
- func RunMigra(ctx context.Context, schema []string, file string, config pgconn.Config, ...) (err error)
- func SaveDiff(out, file string, fsys afero.Fs) error
Constants ¶
View Source
const LIST_SCHEMAS = "SELECT schema_name FROM information_schema.schemata WHERE NOT schema_name LIKE ANY($1) ORDER BY schema_name"
Variables ¶
This section is empty.
Functions ¶
func ApplyMigrations ¶ added in v1.0.9
func ApplyMigrations(ctx context.Context, url string, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error
Applies local migration scripts to a database.
func BatchExecDDL ¶ added in v1.7.3
func CreateShadowDatabase ¶ added in v1.27.2
func DiffDatabase ¶ added in v1.28.0
func DiffSchema ¶ added in v1.27.2
func DiffSchemaMigra ¶ added in v1.27.4
Diffs local database schema against shadow, dumps output to stdout.
func LoadUserSchemas ¶ added in v1.28.0
func MigrateDatabase ¶ added in v1.7.3
func MigrateShadowDatabase ¶ added in v1.27.2
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.