db

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package db provides CLI commands for managing database operations, including running and rolling back schema migrations.

Index

Constants

This section is empty.

Variables

View Source
var DBCmd = &cobra.Command{
	Use:          "db",
	Short:        "Database commands",
	SilenceUsage: true,
	RunE: func(cmd *cobra.Command, args []string) error {
		return cmd.Help()
	},
}

DBCmd is the root Cobra command for database-related subcommands. It groups subcommands such as migrate and displays help when invoked without a subcommand.

View Source
var ErrConfigNotLoaded = errors.New("config not loaded")

ErrConfigNotLoaded is returned when the application configuration has not been initialised before running a migration command.

View Source
var ErrMigrationNotSupported = errors.New("migrations not supported for configured database type")

ErrMigrationNotSupported is returned when the configured database backend does not support schema migrations.

View Source
var ErrSQLConfigRequired = errors.New("sql config is required for migrations")

ErrSQLConfigRequired is returned when a migration command is invoked but no SQL configuration is present.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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