docs/codebase-map.json before editing database logic.
Known data concepts
| Concept | Notes |
|---|---|
| Workspace | Company account, likely keyed by org_id. |
| Message | Website submission or customer email. |
| Category | Workspace label for routing and reporting. |
| API key | Website integration credential. |
| Team member | User membership and role. |
| Email connection | Gmail or Outlook provider state. |
Safe edit rules
- Preserve
org_idon workspace data. - Preserve foreign key relationships.
- Preserve RLS policies.
- Migrate data before removing fields.
- Keep API payload fields backward compatible.
Before changing tables
- Read migrations.
- Search all reads and writes for the table.
- Confirm RLS policy impact.
- Add migration and rollback plan.
- Update docs after source changes.