Skip to main content
Create database tables and schema.

Overview

Postgres is provisioned by your Terraform ground. On DigitalOcean there are three modes, chosen in terraform.tfvars; on AWS the ground provisions a fresh database: 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

This applies every migration in order, and is safe to re-run. The baseline enables the vector and pg_stat_statements extensions and creates the 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
The migrations themselves are the authoritative list, and later ones add to the baseline.

2. Verify

BYO Postgres Only

With byo_postgres_url, the ground manages nothing about your database, so the requirements are yours to meet:

Troubleshooting

Next Steps