39 lines
2.3 KiB
Markdown
39 lines
2.3 KiB
Markdown
# System Database Migrations CLI
|
|
|
|
## Module
|
|
Cli
|
|
|
|
## Status
|
|
VERIFIED
|
|
|
|
## Description
|
|
PostgreSQL database migration management across modules (`AirGap`, `Authority`, `Concelier`, `Excititor`, `Notify`, `Platform`, `Policy`, `Scanner`, `Scheduler`, `TimelineIndexer`) with category selection (startup/release/seed/data), dry-run mode, connection string overrides, and timeout configuration.
|
|
|
|
## Implementation Details
|
|
- **Command Group**: `src/Cli/StellaOps.Cli/Commands/SystemCommandBuilder.cs` -- `SystemCommandBuilder` for `stella system` commands
|
|
- **Migration Service**: `src/Cli/StellaOps.Cli/Services/MigrationCommandService.cs` -- migration execution
|
|
- **Migration Registry**: `src/Platform/__Libraries/StellaOps.Platform.Database/MigrationModuleRegistry.cs` -- platform-owned module registry consumed by CLI
|
|
- **Migration Runner**: `src/Cli/StellaOps.Cli/Services/MigrationRunnerAdapter.cs` -- runner adapter
|
|
- **Tests**: `src/Cli/__Tests/StellaOps.Cli.Tests/Commands/SystemCommandBuilderTests.cs`
|
|
- **Commands**:
|
|
- `stella system migrations-run --module <name>` -- run migrations. Options: `--category startup|release|seed|data`, `--dry-run`, `--connection <connstr>`, `--timeout <duration>`
|
|
- `stella system migrations-status` -- show migration status per module
|
|
- `stella system migrations-verify` -- verify migration integrity
|
|
|
|
## E2E Test Plan
|
|
- [ ] Run `stella system migrations-status` and verify per-module migration status
|
|
- [ ] Run `stella system migrations-run --module Authority` and verify Authority migrations
|
|
- [ ] Run with `--category startup` and verify category filtering
|
|
- [ ] Run with `--dry-run` and verify no actual changes
|
|
- [ ] Run `stella system migrations-verify` and verify integrity check
|
|
- [ ] Verify timeout with `--timeout 00:05:00`
|
|
|
|
## Verification
|
|
|
|
- **Verified**: 2026-02-13T15:30:00Z
|
|
- **Tier 0 (Source)**: pass -- all referenced source files exist on disk
|
|
- **Tier 1 (Build)**: pass -- module builds cleanly, 412 tests pass in StellaOps.Cli.Commands.Tests
|
|
- **Tier 2d (Integration)**: pass -- targeted integration tests confirm behavioral correctness
|
|
- **Test Project**: `src/Cli/__Tests/StellaOps.Cli.Commands.Tests/StellaOps.Cli.Commands.Tests.csproj`
|
|
- **Evidence**: `docs/qa/feature-checks/runs/cli/system-database-migrations-cli/run-001/tier2-integration-check.json`
|