sdkMigrations
constsdkMigrations:Readonly<{maxVersion:number;minVersion:number;sortedMigrations:Readonly<{steps:MigrationStep[];toVersion:number; }>[];validated:true; }>
Defined in: src/lib/db/schema.ts:300
Combined migrations for all SDK storage modules.
These migrations handle database schema upgrades from any previous version to the current version. The SDK manages all migration logic internally, so consumer apps don’t need to handle version arithmetic or migration merging.
Minimum supported version: v2 Migrations from v1 are not supported. Databases at v1 require a fresh install.
Migration history:
- v2 → v3: Added
was_stoppedcolumn to history table - v3 → v4: Added
modelPreferencestable for settings storage - v4 → v5: Added
errorcolumn to history table for error persistence - v5 → v6: Added
thought_processcolumn to history table for activity tracking - v6 → v7: Added
userPreferencestable for unified user settings storage - v7 → v8: BREAKING - Clear all data (embedding model change)
- v8 → v9: Added
thinkingcolumn to history table for reasoning/thinking content - v9 → v10: Added
projectstable andproject_idcolumn to conversations - v10 → v11: Added
mediatable for library feature, addedfile_idscolumn to history - v11 → v12: Added
chunkscolumn to history table for sub-message semantic search - v12 → v13: Added
parent_message_idcolumn to history table for message branching - v13 → v14: Added
feedbackcolumn to history table for like/dislike on responses - v14 → v15: Replaced
memoriestable withmemory_vaulttable for persistent memory vault - v15 → v16: Added
scopecolumn to memory_vault table for memory partitioning - v16 → v17: Added
image_modelcolumn to history table for AI-generated image model tracking - v17 → v18: Added
vault_folderstable (with scope) andfolder_idcolumn to memory_vault for folder organization - v18 → v19: Added
user_idcolumn to memory_vault for multi-user server-side scoping - v19 → v20: Added index on
updated_atcolumn of memory_vault for efficient since-based filtering - v20 → v21: Added
embeddingcolumn to memory_vault for persisted embedding vectors - v21 → v22: Added
is_systemcolumn to vault_folders for default system folders - v22 → v23: Added
conversation_summariestable for progressive history summarization - v23 → v24: Added
contextcolumn to vault_folders for LLM-generated folder summaries - v24 → v25: Added
saved_toolstable for user-saved display apps exposed as LLM tools - v25 → v26: Added
app_filestable for LLM-generated app source files (HTML/CSS/JS) - v26 → v27: Added
tool_call_eventscolumn to history for reconstructing tool call history
Last updated on