executor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

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

Executor handles the execution of migrations

func New

func New(cfg *config.Config) (*Executor, error)

New creates a new migration executor

func (*Executor) Close

func (e *Executor) Close() error

Close closes the database connection

func (*Executor) Config

func (e *Executor) Config() *config.Config

Config returns the configuration

func (*Executor) ExecuteAllMigrations

func (e *Executor) ExecuteAllMigrations() (int, error)

ExecuteAllMigrations executes all pending migrations

func (*Executor) ExecuteMigration

func (e *Executor) ExecuteMigration(migration migrations.Migration) error

ExecuteMigration executes a single migration

func (*Executor) ExecuteNextMigration

func (e *Executor) ExecuteNextMigration() (bool, error)

ExecuteNextMigration executes the next pending migration

func (*Executor) GetPendingMigrations

func (e *Executor) GetPendingMigrations() []migrations.Migration

GetPendingMigrations returns migrations that have not been applied yet

func (*Executor) Status

Status returns the status of migrations

Jump to

Keyboard shortcuts

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