chore: Bump version to 6.0.6
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 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "claude-mem",
|
"name": "claude-mem",
|
||||||
"version": "6.0.5",
|
"version": "6.0.6",
|
||||||
"source": "./plugin",
|
"source": "./plugin",
|
||||||
"description": "Persistent memory system for Claude Code - context compression across sessions"
|
"description": "Persistent memory system for Claude Code - context compression across sessions"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
**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
|
## IMPORTANT: Skills Are Auto-Invoked
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "claude-mem",
|
"name": "claude-mem",
|
||||||
"version": "6.0.5",
|
"version": "6.0.6",
|
||||||
"description": "Memory compression system for Claude Code - persist context across sessions",
|
"description": "Memory compression system for Claude Code - persist context across sessions",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"claude",
|
"claude",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "claude-mem",
|
"name": "claude-mem",
|
||||||
"version": "6.0.5",
|
"version": "6.0.6",
|
||||||
"description": "Persistent memory system for Claude Code - seamlessly preserve context across sessions",
|
"description": "Persistent memory system for Claude Code - seamlessly preserve context across sessions",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Alex Newman"
|
"name": "Alex Newman"
|
||||||
|
|||||||
@@ -495,13 +495,11 @@ export class SessionStore {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensure discovery_tokens column exists (migration 7)
|
* 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 {
|
private ensureDiscoveryTokensColumn(): void {
|
||||||
try {
|
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
|
// Check if discovery_tokens column exists in observations table
|
||||||
const observationsInfo = this.db.pragma('table_info(observations)');
|
const observationsInfo = this.db.pragma('table_info(observations)');
|
||||||
const obsHasDiscoveryTokens = (observationsInfo as any[]).some((col: any) => col.name === 'discovery_tokens');
|
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');
|
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());
|
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(7, new Date().toISOString());
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error('[SessionStore] Discovery tokens migration error:', error.message);
|
console.error('[SessionStore] Discovery tokens migration error:', error.message);
|
||||||
|
throw error; // Re-throw to prevent silent failures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user