engine

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migrator

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

Migrator is the core engine that orchestrates the migration process.

func New

func New(dbDriver driver.DatabaseDriver, fileSys fs.FS, dirPath string) *Migrator

New creates a new Migrator instance.

func (*Migrator) Down

func (m *Migrator) Down(ctx context.Context) error

Down reverts the most recently applied migration (1 step rollback).

func (*Migrator) DryRun

func (m *Migrator) DryRun(ctx context.Context) error

DryRun simulates applying all pending migrations to catch errors before actual deployment.

func (*Migrator) Up

func (m *Migrator) Up(ctx context.Context) error

Up executes all pending 'up' migrations.

type Seeder

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

Seeder handles the execution of database seed files.

func NewSeeder

func NewSeeder(dbDriver driver.DatabaseDriver, fileSys fs.FS, dirPath string) *Seeder

NewSeeder creates a new Seeder instance.

func (*Seeder) Run

func (s *Seeder) Run(ctx context.Context) error

Run executes all SQL files found in the specified seeder directory.

Jump to

Keyboard shortcuts

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