feat: add migration 006_memory.sql for cross-chat memory tables
Add two new tables for cross-chat memory feature: - memory_facts: stores explicit user-provided facts (user_id, content, created_at) - conversation_summaries: stores conversation summaries with vector embeddings for similarity search This migration prepares the database schema for Task 2-7 of the cross-chat memory feature plan. No indexes yet (sequential scan sufficient for expected data volume). Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019iZMEPk2Kt1UC96Lo9bC5w
This commit is contained in:
parent
32026d4264
commit
8856ef16a1
|
|
@ -0,0 +1,13 @@
|
||||||
|
CREATE TABLE memory_facts (
|
||||||
|
id SERIAL PRIMARY KEY,
|
||||||
|
user_id INTEGER NOT NULL REFERENCES users(id),
|
||||||
|
content TEXT NOT NULL,
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE conversation_summaries (
|
||||||
|
conversation_id INTEGER PRIMARY KEY REFERENCES conversations(id),
|
||||||
|
summary TEXT NOT NULL,
|
||||||
|
embedding vector(768) NOT NULL,
|
||||||
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
Loading…
Reference in New Issue