migrations

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

func NewExporter

func NewExporter(
	name string,
	pager *common.Pager,
	templateName string,
	ddlBuilder *sql.DDLBuilderManager,
	maker MigrationMaker,
) *Exporter

func (*Exporter) Export

func (e *Exporter) Export(
	ctx context.Context,
	params *exporter.ExportParams,
) ([]*exporter.ExportedPage, error)

func (*Exporter) ExportPerFile

func (e *Exporter) ExportPerFile(
	ctx context.Context,
	params *exporter.ExportParams,
) ([]*exporter.ExportedPage, error)

type FuncMigrationMaker

type FuncMigrationMaker struct {
	// contains filtered or unexported fields
}

func (*FuncMigrationMaker) MakeMultiple

func (m *FuncMigrationMaker) MakeMultiple() *MigrationMeta

func (*FuncMigrationMaker) MakeSingle

func (m *FuncMigrationMaker) MakeSingle(index int, tableName gds.String) *MigrationMeta

type MakeMultipleMigrationFunc

type MakeMultipleMigrationFunc func() *MigrationMeta

type MakeSingleMigrationFunc

type MakeSingleMigrationFunc func(index int, tableName gds.String) *MigrationMeta

type Migration

type Migration struct {
	Meta map[string]interface{}

	UpQueries   []string
	DownQueries []string
}

type MigrationMaker

type MigrationMaker interface {
	MakeSingle(index int, tableName gds.String) *MigrationMeta
	MakeMultiple() *MigrationMeta
}

type MigrationMeta

type MigrationMeta struct {
	Filename string
	Attrs    map[string]interface{}
}

Jump to

Keyboard shortcuts

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