Architect storage around SQLite+Honker: remove PG, add multi-tenant identity, scoping
Reorient @alkdev/storage around a single SQLite database host with Honker
for pub/sub, event streams, and task queues. PostgreSQL is removed as a
target (ADR-038), eliminating dual schema maintenance and infrastructure
complexity. Honker provides DB + pubsub + queues in one .db file (ADR-039).
Add system/tenant DB model (ADR-040): identity tables in system.db, all
graph data in tenant-{orgId}.db files. Identity tables move from the hub
into storage (ADR-041). Scoping columns (ownerId, projectId) added to
graphs table (ADR-042). Graph types get scope (system/tenant/user) to
protect infrastructure schemas (ADR-043).
Define Drizzle-Honker session adapter (ADR-044): ~100-line adapter enabling
Drizzle typed queries and Honker pubsub/queue on a single connection with
transactional consistency.
Resolve OQ-03, OQ-04, OQ-19, OQ-21, OQ-22, OQ-23, OQ-24. Add new
open questions OQ-26 through OQ-29 for Honker integration specifics.
New docs: honker-integration.md (adapter, event patterns, migration).
Scrub all PG/jsonb/libsql references from existing spec docs.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
status: reviewed
|
||||
last_updated: 2026-05-30
|
||||
status: draft
|
||||
last_updated: 2026-05-31
|
||||
---
|
||||
|
||||
# Forward Look: Pointers, dbtype, and Universal IR
|
||||
@@ -162,12 +162,15 @@ integration is deferred because:
|
||||
- dbtype is Phase 0 (architecture complete, no implementation)
|
||||
- The manual defs work and are well-understood
|
||||
- The Module pattern for graph types can be adopted independently (no dbtype
|
||||
dependency)
|
||||
dependency)
|
||||
- With PostgreSQL removed (ADR-038), the original pressure for dbtype —
|
||||
eliminating dual SQLite/PG table maintenance — is significantly reduced.
|
||||
There is now only one set of table definitions to maintain.
|
||||
|
||||
When dbtype reaches Phase 1 (implementation), storage can migrate from
|
||||
Drizzle table definitions to dbtype elements one table at a time. The
|
||||
Module-based graph type definitions are already compatible — they're both
|
||||
TypeBox `Type.Module` objects.
|
||||
Drizzle table definitions to dbtype elements one table at a time. The Module-based
|
||||
graph type definitions are already compatible — they're both TypeBox `Type.Module`
|
||||
objects.
|
||||
|
||||
## ujsx as Universal IR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user