This repository was archived by the owner on Feb 21, 2026. It is now read-only.
forked from qwibitai/nanoclaw
-
Notifications
You must be signed in to change notification settings - Fork 0
[Upstream PR #237] Versioned DB migration framework + channel column #102
Copy link
Copy link
Open
Description
Summary
Upstream PR: qwibitai#237
Author: astoreyai (Aaron Storey)
Status: OPEN
Changes: +138 / -10 LOC, 8 files
Replaces ad-hoc try/catch ALTER TABLE pattern with proper versioned migration framework. Adds channel column to registered_groups for multi-channel routing.
Key Changes
-
Migration Framework (
src/db.ts)- New
schema_versiontable (single-row, version integer) runMigrations()applies pending migrations sequentially- Migration 1:
context_modecolumn (previously ad-hoc try/catch) - Migration 2:
channelcolumn onregistered_groups
- New
-
Type Changes (
src/types.ts)RegisteredGroup.channel: string- Identifies owning channel (e.g., 'whatsapp', 'telegram', 'slack')
-
IPC Changes (
src/ipc.ts)register_groupcommand accepts optionalchannelfield, defaults to 'whatsapp'
-
Tests
- 4 new tests for channel storage, retrieval, multi-channel routing, migration idempotency
- All existing test fixtures updated with
channel: 'whatsapp' - 143/143 tests pass
Architecture Benefits
- Proper migrations - Sequential, versioned, idempotent
- Multi-channel support - Same group JID can exist on different channels
- Backward compatible - Existing DBs auto-migrate, default to 'whatsapp'
- Testable - Migration framework is unit tested
Risk
MEDIUM
- Database schema changes (migration risk)
- Requires testing with existing databases
- Could break if migration fails mid-process
Recommendation
🟡 MONITOR
- Wait for upstream merge and community testing
- Good architectural direction (proper migrations)
- Complements PR feat: Add Slack channel support (RFS) qwibitai/nanoclaw#244 (Slack support) nicely
OmniAura Considerations
- We already have multi-backend support (apple-container, sprites, etc.)
- Adding multi-channel support makes sense
- Need to test migration path on our production DBs
Action Items
- Wait for upstream merge
- Test migration on backup of production DB
- Consider adopting after proven stable
- Verify no conflicts with our custom schema changes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels