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.
Click to show internal directories.
Click to hide internal directories.