Repository navigation
Description
Orbit's schema contains several tables that are created on every deployment, migrated, indexed, and never read or written by a single line of application code.
They are not mistakes. They are the shape of features that were designed and then not built, and because the schema work is already done and already reviewed, they are unusually good contribution targets. The hardest decision on most features, which is how to model it, has been made.
The dormant tables
Verified by grepping the whole repository for each table outside packages/db/src/schema and packages/db/tests:
| Table | In packages/db/src/schema/ |
Application code that touches it |
|---|---|---|
webhook, webhook_log |
comms.ts |
None |
automation_rule |
comms.ts |
None |
audit_log |
comms.ts |
None |
api_key |
comms.ts |
None |
module, module_member, module_issue, module_link |
work.ts |
Only the Plane importer |
intake, intake_issue |
work.ts |
Only the Plane importer |
The only references anywhere else are in packages/db/tests/schema/index.test.ts, which asserts the tables exist, and in packages/db/src/import/, which populates modules and intake when importing from Plane. So a Plane import today writes rows that nothing in Orbit can display.
Why this matters beyond tidiness
- A self hoster reading the schema reasonably concludes Orbit has an audit log. It does not.
- A Plane import silently drops the user's modules and intake into tables with no UI, which looks like data loss.
- Five migrations run on every deployment for features nobody can use.
The issues under this epic
Each is independent:
- Outbound webhooks, which is #126 and already open. The
webhookandwebhook_logtables are waiting for it. - Add the narrow GitHub lifecycle automation rules #193 automation rules: when this happens, do that
- The audit log table is never written to #194 an audit log that is actually written
- Personal API keys and a public REST API #195 personal API keys and a public REST API
- Modules: four tables the Plane importer fills and nothing displays #196 modules: a UI for the tables the Plane importer already fills
- Intake and triage: a front door for issues from outside the team #197 intake and triage: same
- Jira and GitHub Issues importers #229 Jira and GitHub Issues importers, which is where the module and intake tables came from
The alternative is to delete them
If a table has no owner and no plan, dropping it is a better outcome than leaving it to imply a feature that does not exist. If you think one of these should go rather than be built, say so on this thread. That is a legitimate and welcome position, and "delete automation_rule" is a perfectly good pull request if the discussion lands there.
What is not acceptable is leaving them exactly as they are, because the current state misleads everyone who reads the schema.
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsBacklog
Activity
imshashank commentedon Aug 15, 2026
Re-verified on
3ba32cb, and the table has changedEvery table listed here is still dormant, so the epic stands. Two rows are now worse than described, and the count in the title is low.
webhook,webhook_log,webhook_deliverywebhook_deliverywas not in the original table. Onlyorganization-deletion-service.tsreferences them, to cascade on delete, which is cleanup rather than useautomation_ruleaudit_logapi_keymodule,module_member,module_issue,module_linkintake,intake_issueWhy the last two changed. #287 quarantined the importer tooling and deleted
packages/db/src/import/index.tsalong with every import script. The parsers and mappers survive as unreachable library code, so nothing populates modules or intake any more.That removes one of the arguments in this epic:
There is no Plane import. Nothing writes those rows at all now, which makes them cleanly dormant rather than half-used, and it means #196 can be decided purely on whether Orbit wants modules, without the data-loss argument.
The other arguments are unaffected, and the strongest one is untouched: a self hoster reading the schema reasonably concludes Orbit has an audit log, and it does not. That is #194 and it is the one I would prioritise, since it is the only entry here where the gap between what the schema implies and what the product does could matter to somebody's compliance story.
Suggested title change. "five database tables" was already an undercount and is now clearly wrong. There are six groups and thirteen tables. Worth renaming to something that does not need editing again, for example "Epic: dormant database tables that ship on every deployment and no code reads".
Children unchanged: #193 automation rules, #194 audit log, #195 API keys and public REST API, #196 modules, #197 intake. #126 outbound webhooks is the feature behind the
webhooktables and is filed outside this epic; worth linking it in as a child, since it is the same class of work.imshashank commentedon Aug 15, 2026
Correcting a row in the table above. I added
webhook_deliveryto the dormant list and that is wrong.webhook_deliveryis live.apps/web/src/app/api/webhooks/github/route.tsinserts a row per inbound delivery and updates its status throughreceived,processingandfailed, using it to claim and deduplicate deliveries. #248 and #198 both build on it. It should not appear in this epic at all.The corrected row:
webhook,webhook_logwebhookis referenced only byorganization-deletion-service.tsfor cascade cleanupSo the count is back to what the original table said for that row, and the epic covers six groups and twelve tables rather than thirteen. Everything else in my comment stands, including the change to the
moduleandintakerows, which I verified separately.imshashank commentedon Sep 6, 2026
Closing the epic with a decision per table, so nobody has to re-derive it:
webhook,webhook_log: build, Outbound webhooks #126.audit_log: build, The audit log table is never written to #194.api_key: build, Personal API keys and a public REST API #195, keys and bearer auth first.automation_rule: build the narrow git-lifecycle version only, Add the narrow GitHub lifecycle automation rules #193.module,module_member,module_issue,module_link: drop, Drop the module tables and the Plane mapping that filled them #417.intake,intake_issue: reshape when Intake and triage: a front door for issues from outside the team #197 is designed rather than keep the imported shape.The epic's point stands: the schema must not advertise features that do not exist, and those five issues are where that gets fixed.