From 798dec972ed99fdb32abe899a984b4172618c417 Mon Sep 17 00:00:00 2001 From: Alex Newman Date: Mon, 17 Nov 2025 13:18:49 -0500 Subject: [PATCH] chore: Bump version to 6.0.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Critical bugfix for database migration issue (Issue #121) Changes: - Fix migration logic to always verify column existence - Remove early return that trusted schema_versions alone - Ensures discovery_tokens columns exist before queries - Prevents "no such column" errors for all users 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .claude-plugin/marketplace.json | 2 +- CLAUDE.md | 2 +- package.json | 2 +- plugin/.claude-plugin/plugin.json | 2 +- src/services/sqlite/SessionStore.ts | 9 ++++----- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 2de9ecd6..550a8210 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -10,7 +10,7 @@ "plugins": [ { "name": "claude-mem", - "version": "6.0.5", + "version": "6.0.6", "source": "./plugin", "description": "Persistent memory system for Claude Code - context compression across sessions" } diff --git a/CLAUDE.md b/CLAUDE.md index ea6f57f8..eff66d0c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,7 @@ Claude-mem is a Claude Code plugin providing persistent memory across sessions. **Your Role**: You are working on the plugin itself. When users interact with Claude Code with this plugin installed, your observations get captured and become their persistent memory. -**Current Version**: 6.0.5 +**Current Version**: 6.0.6 ## IMPORTANT: Skills Are Auto-Invoked diff --git a/package.json b/package.json index 0f3de46d..70cd4eea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "claude-mem", - "version": "6.0.5", + "version": "6.0.6", "description": "Memory compression system for Claude Code - persist context across sessions", "keywords": [ "claude", diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index f0b3ba09..2d332261 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "claude-mem", - "version": "6.0.5", + "version": "6.0.6", "description": "Persistent memory system for Claude Code - seamlessly preserve context across sessions", "author": { "name": "Alex Newman" diff --git a/src/services/sqlite/SessionStore.ts b/src/services/sqlite/SessionStore.ts index aca08aba..e67aaa2c 100644 --- a/src/services/sqlite/SessionStore.ts +++ b/src/services/sqlite/SessionStore.ts @@ -495,13 +495,11 @@ export class SessionStore { /** * Ensure discovery_tokens column exists (migration 7) + * CRITICAL: Always verify column existence, don't trust schema_versions alone + * This prevents "no such column" errors when migrations were recorded but failed */ private ensureDiscoveryTokensColumn(): void { try { - // Check if migration already applied - const applied = this.db.prepare('SELECT version FROM schema_versions WHERE version = ?').get(7) as {version: number} | undefined; - if (applied) return; - // Check if discovery_tokens column exists in observations table const observationsInfo = this.db.pragma('table_info(observations)'); const obsHasDiscoveryTokens = (observationsInfo as any[]).some((col: any) => col.name === 'discovery_tokens'); @@ -520,10 +518,11 @@ export class SessionStore { console.error('[SessionStore] Added discovery_tokens column to session_summaries table'); } - // Record migration + // Record migration only after successful column verification/addition this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(7, new Date().toISOString()); } catch (error: any) { console.error('[SessionStore] Discovery tokens migration error:', error.message); + throw error; // Re-throw to prevent silent failures } }