30 lines
1.6 KiB
Markdown
30 lines
1.6 KiB
Markdown
# System Database Migrations CLI
|
|
|
|
## Module
|
|
Cli
|
|
|
|
## Status
|
|
IMPLEMENTED
|
|
|
|
## Description
|
|
PostgreSQL database migration management across modules (Authority, Scheduler, Concelier, Policy, Notify, Excititor) 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/Cli/StellaOps.Cli/Services/MigrationModuleRegistry.cs` -- module registry
|
|
- **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`
|