Documentation
¶
Overview ¶
Package cli provides a command-line interface for Queen migrations.
Index ¶
Constants ¶
View Source
const ( DriverPostgres = "postgres" DriverPostgreSQL = "postgresql" DriverMySQL = "mysql" DriverSQLite = "sqlite" DriverSQLite3 = "sqlite3" DriverClickHouse = "clickhouse" DriverCockroach = "cockroachdb" DriverMSSQL = "mssql" DriverSQLServer = "sqlserver" SQLDriverPostgres = "pgx" SQLDriverMySQL = "mysql" SQLDriverSQLite = "sqlite3" SQLDriverClickHouse = "clickhouse" SQLDriverMSSQL = "sqlserver" )
View Source
const DefaultTableName = "queen_migrations"
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(register RegisterFunc)
Run starts the CLI with the given migration registration function.
func RunWithDB ¶
func RunWithDB(register RegisterFunc, dbOpener DBOpener)
RunWithDB starts the CLI with a custom database opener.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App holds the CLI application state.
type Config ¶
type Config struct {
Driver string `yaml:"driver"`
DSN string `yaml:"dsn"`
Table string `yaml:"table"`
LockTimeout time.Duration `yaml:"lock_timeout"`
UseConfig bool `yaml:"-"`
Env string `yaml:"-"`
UnlockProduction bool `yaml:"-"`
Yes bool `yaml:"-"`
JSON bool `yaml:"-"`
Verbose bool `yaml:"-"`
// contains filtered or unexported fields
}
Config holds all configuration options for the CLI.
type ConfigFile ¶
type ConfigFile struct {
ConfigLocked bool `yaml:"config_locked"`
Naming *NamingConfig `yaml:"naming"`
Environments map[string]*Environment `yaml:",inline"`
}
ConfigFile represents the structure of .queen.yaml
type DoctorResult ¶
type DoctorResult struct {
Check string `json:"check"`
Status string `json:"status"`
Message string `json:"message"`
Details string `json:"details,omitempty"`
Severity string `json:"severity,omitempty"`
}
DoctorResult represents a health check result.
type Environment ¶
type Environment struct {
Driver string `yaml:"driver"`
DSN string `yaml:"dsn"`
Table string `yaml:"table"`
LockTimeout time.Duration `yaml:"lock_timeout"`
RequireConfirmation bool `yaml:"require_confirmation"`
RequireExplicitUnlock bool `yaml:"require_explicit_unlock"`
}
Environment represents a single environment configuration.
type NamingConfig ¶
type NamingConfig struct {
Pattern string `yaml:"pattern"`
Padding int `yaml:"padding"`
Enforce *bool `yaml:"enforce"`
}
NamingConfig represents naming pattern configuration in YAML.
type RegisterFunc ¶
RegisterFunc is a function that registers migrations with Queen.
Source Files
¶
- app.go
- baseline_workflow.go
- check_run.go
- cli.go
- cmd_baseline.go
- cmd_check.go
- cmd_create.go
- cmd_diff.go
- cmd_doctor.go
- cmd_doctor_output.go
- cmd_down.go
- cmd_explain.go
- cmd_gap.go
- cmd_gap_output.go
- cmd_goto.go
- cmd_import.go
- cmd_init.go
- cmd_log.go
- cmd_plan.go
- cmd_reset.go
- cmd_squash.go
- cmd_status.go
- cmd_tui.go
- cmd_up.go
- cmd_validate.go
- cmd_version.go
- command_runtime.go
- commands.go
- config.go
- confirmation.go
- create_templates.go
- diff_output.go
- diff_resolve.go
- doctor_checks.go
- doctor_fix.go
- doctor_schema.go
- driver.go
- gap_detect.go
- gap_fill.go
- gap_ignore.go
- init_templates.go
- log_output.go
- logo.go
- migrate_target.go
- output.go
- plan_output.go
- setup.go
- squash_workflow.go
- user.go
Directories
¶
| Path | Synopsis |
|---|---|
|
commands
|
|
|
Package tui provides a terminal UI for Queen migrations.
|
Package tui provides a terminal UI for Queen migrations. |
|
live
Package live renders a Bubble Tea live-view of queen migration tap events.
|
Package live renders a Bubble Tea live-view of queen migration tap events. |
Click to show internal directories.
Click to hide internal directories.