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¶
-
Save anything you want back later:
bash bash .devcontainer/db-export.shThe export lands at/workspaces/trueserve-framework/.dev-snapshots/db-<timestamp>.sql. -
Run the reset script:
bash bash .devcontainer/db-init-local.shThis drops every TrueServe DB, recreates them, and replays every script indeploy/init-scripts/in order. -
Restart services that cache schema:
bash overmind restart ai-manager ai-orchestrator agent-host async-agent -
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.