export

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Filename string
	Content  string
}

Artifact represents a generated migration file ready to be written to disk.

func Export

func Export(p *plan.Plan, format Format, version string, timestamp time.Time) ([]Artifact, error)

Export generates migration artifacts for the plan in the requested format.

type Format

type Format string

Format represents the target format for migration export.

const (
	// FormatSQL emits a standard SQL file with transactional and non-transactional annotations.
	FormatSQL Format = "sql"
	// FormatGoose emits a Goose-compatible migration file with Up/Down sections.
	FormatGoose Format = "goose"
	// FormatAtlas emits an Atlas-compatible SQL migration file.
	FormatAtlas Format = "atlas"
	// FormatMigrate emits golang-migrate compatible .up.sql and .down.sql migration files.
	FormatMigrate Format = "migrate"
	// FormatGolangMigrate is an alias for FormatMigrate.
	FormatGolangMigrate Format = "golang-migrate"
)

Jump to

Keyboard shortcuts

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