Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.yourhq.ai/llms.txt

Use this file to discover all available pages before exploring further.

Migrations live in db/migrations/. Run them in filename order for a fresh project.

Migration files

FileDomain
001_extensions.sqlPostgres extensions
002_enums.sqlShared enum types
003_shared_functions.sqlCommon trigger functions
004_workspace.sqlWorkspace, pipeline, fields
005_crm.sqlContacts, organizations, campaigns
006_gateways.sqlGateway registry and tokens
007_agents.sqlAgent metadata and org chart
008_interactions.sqlContact interaction timeline
009_tasks_streams.sqlTasks, streams, recurrence
010_comments_attachments.sqlComments and attachments
011_assets_documents.sqlDocuments and assets
012_audit_notifications.sqlAudit log and notifications
013_agent_inbox.sqlInbox queue and automation triggers
014_agent_commands.sqlCommand queue and lifecycle RPCs
015_usage_budgets.sqlUsage tracking and budgets
016_rls_realtime_storage.sqlRLS policies, Realtime, Storage
017_setup_wizard.sqlFirst-run setup RPC

Applying migrations

Run every .sql file in order from the Supabase SQL Editor, or use the onboarding wizard which concatenates them into a single copy-paste blob.
Always include explicit GRANT statements for authenticated and service_role in any new migrations. Supabase does not grant these by default.