Skip to content

Runbook: reset local DB

Status: Current | Last reviewed: 2026-06-18

Wipe and re-initialize the Vanguard Postgres from init-scripts/.

When to run

  • Schema diverged from init-scripts/ and you'd rather start fresh than catch up.
  • You ran a destructive migration in dev and want to undo it.
  • Tests are failing because of leftover data.

Steps

  1. Save anything you want back later: bash bash .devcontainer/db-export.sh The export lands at /workspaces/trueserve-framework/.dev-snapshots/db-<timestamp>.sql.

  2. Run the reset script: bash bash .devcontainer/db-init-local.sh This drops every TrueServe DB, recreates them, and replays every script in deploy/init-scripts/ in order.

  3. Restart services that cache schema: bash overmind restart ai-manager ai-orchestrator agent-host async-agent

  4. Verify by hitting the status page or running: bash psql "$DATABASE_URL" -c "\dt"

Equivalent slash command

/local-db-reset

See .claude/commands/local-db-reset.md.

Why this is safe in Vanguard

Vanguard never holds production data — every row is seed data plus whatever you've created locally. There's no migration story for "schema drift" the way there is in production; the canonical schema is the union of init-scripts/ plus any later script you add.

See also