migrations

package
v1.31.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDown

func IsDown(filename string) bool

func RemovePsqlMetaCommands added in v1.31.0

func RemovePsqlMetaCommands(contents string) string

RemovePsqlMetaCommands strips psql meta-command lines (e.g. `\restrict KEY`, `\unrestrict KEY`, `\connect foo`) from SQL input. These are emitted by pg_dump but are not valid SQL, so they must be removed before parsing.

func RemoveRollbackStatements

func RemoveRollbackStatements(contents string) string

Remove all lines after a rollback comment.

goose: -- +goose Down sql-migrate: -- +migrate Down tern: ---- create above / drop below ---- dbmate: -- migrate:down

Types

This section is empty.

Jump to

Keyboard shortcuts

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