Core Tables
corsair_providers
All integrations you have enabled.
corsair_connections
The tenant connections for each integration. If multi-tenancy is off, this is 1:1 with providers.
corsair_resources
Every piece of data from your integrations, cleaned up and constantly updated.
corsair_events
A log of all events for replay and auditing.
Querying Data
Use the Corsair ORM to query data with full type safety.example.ts
Foreign Keys
You can create foreign keys from your own tables tocorsair_resources. Since Corsair keeps this data fresh through API calls and webhooks, your references always point to up-to-date data.
Database Configuration
Corsair connects directly to PostgreSQL. Pass either apg Pool or a Kysely instance.
corsair.ts
No Table Bloat
Adding more integrations doesn’t add more tables. Slack, Linear, GitHub — they all use the same four tables. Your schema stays clean no matter how many integrations you add.Next Steps
- PostgreSQL schema, indexes, and performance tips