The canonical schema file is packages/db/src/schema.sql. Migrations exist under both packages/db/migrations and packages/db/supabase/migrations.
organizations, users, and projects store workspace identity, membership, plan state, onboarding state, and project thresholds.
api_keys stores project key prefix and hash. provider_keys stores encrypted upstream credentials and currently has one provider row per project.
request_logs stores request metadata, decision, internal reason, route, provider, model, geo fields, tokens, cost estimate, and timestamp.
ip_rules, geo_rules, and model_rules back network, region, and model controls.
workspace_audit_events and credit_purchases support audit history and purchased capacity.
Workspace plan tier. plus is the internal key for public Pro.
Credit-backed capacity balance used by runtime quota logic.
Internal storage field for public Sentry Mode.
Encrypted upstream provider credential decrypted during forwarding.
Region values are Panicly-defined buckets, not arbitrary map polygons.
Research notes found workspace_audit_events in SQL while the typed Database interface did not fully cover it. Verify type coverage before generating typed DB docs.