migrations

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropCoreMigrations

func DropCoreMigrations(
	ctx context.Context,
	logger models.Logger,
	logLevel string,
	provider string,
	db bun.IDB,
) error

DropCoreMigrations rolls back all core database migrations

func DropMigrations

func DropMigrations(
	ctx context.Context,
	logger models.Logger,
	provider string,
	db bun.IDB,
	sqlFs embed.FS,
	migrationsDir string,
) error

DropMigrations rolls back migrations from an embedded filesystem for a specific plugin

func GetMigrations

func GetMigrations(ctx context.Context, provider string) (*embed.FS, error)

GetMigrations returns the migrations for the specified database provider.

func RunCoreMigrations

func RunCoreMigrations(
	ctx context.Context,
	logger models.Logger,
	logLevel string,
	provider string,
	db bun.IDB,
) error

RunCoreMigrations runs the core database migrations

func RunMigrations

func RunMigrations(
	ctx context.Context,
	logger models.Logger,
	provider string,
	db bun.IDB,
	sqlFs embed.FS,
	migrationsDir string,
) error

RunMigrations runs migrations from an embedded filesystem for a specific plugin

Types

type MigrationOperation

type MigrationOperation int

MigrationOperation represents the type of migration operation

const (
	MigrateUpOperation MigrationOperation = iota
	MigrateDownOperation
)

Jump to

Keyboard shortcuts

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