migrations

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAppliedMigrations

func GetAppliedMigrations(db *sql.DB) ([]int, error)

GetAppliedMigrations returns the list of applied migration versions

func RunEmbeddedMigrations

func RunEmbeddedMigrations(db *sql.DB) error

RunEmbeddedMigrations applies all pending embedded migrations to the database

Types

type Migration

type Migration struct {
	Version int
	Name    string
	SQL     string
}

Migration represents a single database migration

func GetMigrations

func GetMigrations() ([]Migration, error)

GetMigrations returns all embedded migrations sorted by version

Jump to

Keyboard shortcuts

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