migrate

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package migrate provides migration management for the database extension

Index

Constants

This section is empty.

Variables

View Source
var Migrations = migrate.NewMigrations(
	migrate.WithMigrationsDirectory("./migrations"),
)

Migrations is the global migration collection All migrations should register themselves here using init()

View Source
var Models = []interface{}{}

Models is the list of all models that should be auto-registered Add your models here for automatic table creation in development

Functions

func RegisterMigration

func RegisterMigration(up, down func(ctx context.Context, db *bun.DB) error)

RegisterMigration is a helper to register a migration

func RegisterModel

func RegisterModel(model interface{})

RegisterModel adds a model to the auto-registration list

Types

This section is empty.

Jump to

Keyboard shortcuts

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