migrations

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDownMigration

func IsDownMigration(filename string) bool

func RemoveRollbackStatements

func RemoveRollbackStatements(content string, format MigrationFormat) string

Types

type Migration

type Migration struct {
	FilePath   string
	Sequence   int
	Name       string
	Format     MigrationFormat
	UpSQL      string
	DownSQL    string
	Statements []string
}

func DiscoverMigrations

func DiscoverMigrations(dirs []string) ([]Migration, error)

func ParseMigration

func ParseMigration(filePath string) (*Migration, error)

type MigrationFormat

type MigrationFormat int
const (
	Goose MigrationFormat = iota
)

func (MigrationFormat) String

func (f MigrationFormat) String() string

Jump to

Keyboard shortcuts

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