Migrate the database
Apply outstanding migrations
Section titled “Apply outstanding migrations”pnpm exec ahamie db migrate# or:pnpm exec ahamie db migrate --url postgres://user:pass@host:5432/dbThe runner is idempotent — replay against an up-to-date DB is a no-op.
What the v0 migration does
Section titled “What the v0 migration does”- Installs
vector(pgvector) andpgcrypto - Creates 25 tables — see Database schema
- Records itself in
__ahamie_migrations - Creates indexes including a HNSW vector index on
agent_steps.embedding
Studio
Section titled “Studio”pnpm exec ahamie db studioPrints the Drizzle Studio command for local inspection.
Rollbacks
Section titled “Rollbacks”v0 does not ship a rollback runner. Each migration is additive. If you need to roll back, restore from a Postgres logical backup or run a forward-fix migration.