Overview
Postgres is provisioned by your Terraform ground, in one of three modes chosen interraform.tfvars:
Either way the rendered production configuration arrives complete:
DATABASE_URL (pooled, for the services) and DATABASE_URL_DIRECT (for migrations). You never write a connection string by hand.
Steps
1. Run Database Setup
vector and pg_stat_statements extensions and creates the complete schema, 26 tables covering:
- Workflows:
workflows,workflow_executions,workflow_snapshots,node_traces - Nodes and marketplace:
node_definitions,service_definitions,installed_plugins,items,publish_keys - Credentials and usage:
credentials(encrypted at rest with the master key),token_usage,analytics_events - Memory and profiles:
memories,user_profiles,goals,raw_messages,knowledge_docs - Spatial and content: the
dictionary_*family (chunks, ingestion, need states),content_sources - Evaluation and security:
eval_runs,security_attack_corpus,security_run_results
engine/migrations/001_baseline.sql.
2. Verify
BYO Postgres Only
Withbyo_postgres_url, the ground manages nothing about your database, so the requirements are yours to meet:
Troubleshooting
Relocating Data Between Databases
To move data between database providers (e.g., Timescale β DigitalOcean):- Install PostgreSQL 17 client tools (if needed)
pg_dumpthe source database (read-only: source is not modified)- Enable
vectorandpg_stat_statementsextensions on target pg_restoreto the target database- Update
/opt/gravity/.envwith the newDATABASE_URL - Restart the unoverse service
unoverse deploy test.

