migrations

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package migrations exports the Auth-All migration units as files. The host applies the files with its own migration tool. Auth-All never runs a migration on its own.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// Name is the file name without a directory.
	Name string
	// Content is the complete file content.
	Content string
}

File is one exported migration file.

func Render

func Render(units []schema.Unit, d schema.Dialect, f Format) ([]File, error)

Render returns the files of the units in version order.

type Format

type Format string

Format selects the file layout of the export.

const (
	// Goose writes one file for each unit with the goose annotations.
	Goose Format = "goose"
	// Plain writes one up file and one down file for each unit.
	Plain Format = "plain"
)

Supported formats.

Jump to

Keyboard shortcuts

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