diff --git a/migrations/006_memory.sql b/migrations/006_memory.sql new file mode 100644 index 0000000..2788c27 --- /dev/null +++ b/migrations/006_memory.sql @@ -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 +);