Database Permissions
Tightly scope PostgreSQL credentials for TypeGraph with least-privilege runtime and deploy roles.
Permission Model
Use separate roles for deployment and runtime when possible. The deploy role can create extensions, tables, and indexes. The runtime role reads and writes TypeGraph tables but should not be a superuser.
Install pgvector
TypeGraph self-hosted Postgres requires pgvector. Many managed providers preinstall it; otherwise run the extension command with a privileged migration role.
Runtime Role
Use this role for application traffic after typegraphDeploy() has provisioned the schema.
Deploy Role
Use a separate deploy role in migrations or setup jobs. This keeps normal app traffic away from DDL privileges.
Verify Tables
SDK 0.5 uses typegraph_documents, typegraph_events for business events, and typegraph_telemetry for SDK telemetry. Legacy source data is not migrated by the hard-cut setup path.