Documentation
¶
Overview ¶
Package migrate exposes the `arctl db migrate` subcommand. The root CLI normally passes migration sources directly to NewCommand; the package registry remains for lower-level callers that construct the migrate command without explicit sources.
Each source owns its own Postgres schema (set via `golang-migrate`'s `migratepgx.Config{SchemaName: ...}`), so adding a source never moves the OSS source's integer counter — the addressing footgun from the prior shared-table design is gone.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
NewCommand returns the `migrate` parent command with all subcommands attached. The `--source` flag is wired only when more than one source is configured.
func Register ¶
func Register(s Source)
Register adds a migration source to the package registry.
Validates Name against ^[a-z][a-z0-9_]*$. Panics on invalid charset and duplicate Name so source misconfiguration fails fast.
The mutex is defense-in-depth so a contract-violating caller running Register concurrently doesn't trigger a silent data race against Sources().
func ResetForTesting ¶
func ResetForTesting()
ResetForTesting clears the source registry. Test-only.
Types ¶
type Source ¶
type Source = orchestrator.Source
Source aliases orchestrator.Source so a single struct value satisfies both the CLI registry (per-source operations) and the orchestrator's RunUp input (cross-source up). Fields are documented on orchestrator.Source; the alias keeps consumers from needing to import both packages.