migrations

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Migrations = migrate.NewMigrations()

Migrations contains every registered application migration.

Functions

func BringUpToDate

func BringUpToDate(ctx context.Context, db *bun.DB) (*migrate.MigrationGroup, error)

BringUpToDate initializes the migration tables and applies pending migrations.

func Migrate

func Migrate(ctx context.Context, db *bun.DB) (*migrate.MigrationGroup, error)

Migrate initializes the migration tables and applies pending migrations while holding Bun's migration lock.

func NewMigrator

func NewMigrator(db *bun.DB) *migrate.Migrator

NewMigrator creates a migrator for the application migration registry.

func Rollback

func Rollback(ctx context.Context, db *bun.DB) (*migrate.MigrationGroup, error)

Rollback rolls back the last migration group while holding Bun's migration lock.

Types

This section is empty.

Jump to

Keyboard shortcuts

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