- Rename nodes.content → nodes.notes across all services, tools, API routes, and UI - Add dimensions.icon column support (GET/POST routes, types) - Add nodes.event_date column (create/update flows, types) - Drop nodes.type and nodes.is_pinned references - Drop edges.user_feedback references - Drop chat_memory_state table (replaced with DROP IF EXISTS in migration) - Update schema guide files (system/schema.md) - Add runtime migration block in sqlite-client.ts for existing databases - Fix MCP tool schemas (external API keeps 'content' param, maps to 'notes' internally) - Update standalone MCP server (nodeService.js, sqlite-client.js, index.js) - Update HTTP MCP server (server.js, stdio-server.js) - Update all extraction tools (paper, website, youtube) - Update all UI components (FocusPanel, ThreePanelLayout, GridView, ListView, FolderViewOverlay) - TypeScript: 0 errors Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RA-H Scripts
Utility scripts for managing the RA-H knowledge management system.
Directory Structure
scripts/
├── database/ # Database management
│ ├── backup.sh # Create database backups
│ └── restore.sh # Restore from backups
├── helpers/ # Helper management (CRITICAL - used by API)
│ ├── duplicate-helper.js # Create new helpers
│ └── delete-helper.js # Remove helpers
└── migrations/ # Completed one-time migrations
└── cleanup-dimensions.sql
Database Scripts
Create a Backup
npm run backup
- Creates timestamped backup in
/backups/folder - Example:
rah_backup_20250902_102846.sql - Includes all nodes, chunks, edges, dimensions
Restore from Backup
npm run restore backups/rah_backup_20250902_102846.sql
- ⚠️ WARNING: Replaces entire database
- Requires confirmation before proceeding
- Shows verification after restore
List Backups
ls -lt backups/
Helper Scripts
⚠️ CRITICAL: These scripts are used by the API at runtime. DO NOT modify or delete.
Create New Helper
Called automatically by the API when creating helpers through the UI.
node scripts/helpers/duplicate-helper.js "HelperName"
Delete Helper
Called automatically by the API when deleting helpers through the UI.
node scripts/helpers/delete-helper.js "helper-id"
What Gets Backed Up
- All nodes (42,000+ knowledge items)
- Content chunks and embeddings
- Node connections/edges
- Dimensions and metadata
- Database schema and indexes
Notes
- Backups typically ~250MB for 40k+ nodes
- Store backups safely - they contain your entire knowledge base
- Helper scripts are integrated with the application - modify with caution