Skip to content

feat(db): Phase 3 — init wizard, migrate-config, zeph db migrate CLI, CI postgres build#2379

Merged
bug-ops merged 1 commit intomainfrom
feat/m28/db-abstraction-phase3
Mar 29, 2026
Merged

feat(db): Phase 3 — init wizard, migrate-config, zeph db migrate CLI, CI postgres build#2379
bug-ops merged 1 commit intomainfrom
feat/m28/db-abstraction-phase3

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 29, 2026

Summary

  • --init wizard: new database backend selection step (sqlite/postgres); postgres branch prints vault instruction (zeph vault set ZEPH_DATABASE_URL), writes empty placeholder to config, skips sqlite_path
  • --migrate-config: new migrate_database_url() step injects commented-out database_url under [memory]; handles missing section, idempotent
  • zeph db migrate: new CLI subcommand that validates backend URL, connects, runs pending migrations, prints count; credentials redacted in all error paths
  • CI build-postgres job: cargo check -p zeph-db --no-default-features --features postgres — keeps postgres feature flag buildable
  • docker/docker-compose.yml: add ZEPH_DATABASE_URL: ${ZEPH_DATABASE_URL:-}

Deferred

Test plan

  • cargo nextest run --workspace --lib --bins — 6608/6608 pass
  • cargo check -p zeph-db --no-default-features --features postgres
  • zeph --init — verify postgres branch prompts correctly, no URL stored in config
  • zeph --migrate-config — verify idempotent on second run
  • zeph db migrate — verify prints migration count on fresh DB

… CI postgres build

- --init wizard: add database backend selection (sqlite/postgres); postgres
  branch prints vault instruction, writes empty placeholder, skips sqlite_path
- --migrate-config: add migrate_database_url() step; injects commented-out
  database_url under [memory], creates section if absent, idempotent
- zeph db migrate: new CLI subcommand; validates URL, connects and runs
  pending migrations, prints count; redacts credentials in error paths
- CI: add build-postgres job (cargo check -p zeph-db --no-default-features
  --features postgres) to keep postgres build green
- docker/docker-compose.yml: add ZEPH_DATABASE_URL env var
@github-actions github-actions bot added documentation Improvements or additions to documentation rust Rust code changes dependencies Dependency updates config Configuration file changes ci CI/CD configuration enhancement New feature or request labels Mar 29, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 29, 2026 00:24
@github-actions github-actions bot added the size/L Large PR (201-500 lines) label Mar 29, 2026
@bug-ops bug-ops merged commit 927b34c into main Mar 29, 2026
26 checks passed
@bug-ops bug-ops deleted the feat/m28/db-abstraction-phase3 branch March 29, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD configuration config Configuration file changes dependencies Dependency updates documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant