migrate

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RollbackMigrations

func RollbackMigrations(db *sqlx.DB, count int) error

RollbackMigrations rolls back migrations up to a specified count or all if count is -1

func RunMigrations

func RunMigrations(db *sqlx.DB) error

RunMigrations applies all pending migrations in sequence

Types

type Migration

type Migration struct {
	Timestamp int64
	Name      string
	UpSQL     string
	DownSQL   string
}

Migration represents a database migration

Source Files

  • migrate.go

Jump to

Keyboard shortcuts

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