Remove individual messages embedding SQL

This commit is contained in:
Cameron
2026-01-14 14:23:50 -05:00
parent af35a996a3
commit 02ca60a5d0
2 changed files with 0 additions and 22 deletions

View File

@@ -1,3 +0,0 @@
-- Drop tables in reverse order
DROP TABLE IF EXISTS vec_message_embeddings;
DROP TABLE IF EXISTS message_embeddings;

View File

@@ -1,19 +0,0 @@
-- Table for storing message metadata and embeddings
-- Embeddings stored as BLOB for proof-of-concept
-- For production with many contacts, consider using sqlite-vec extension
CREATE TABLE message_embeddings (
id INTEGER PRIMARY KEY NOT NULL,
contact TEXT NOT NULL,
body TEXT NOT NULL,
timestamp BIGINT NOT NULL,
is_sent BOOLEAN NOT NULL,
embedding BLOB NOT NULL,
created_at BIGINT NOT NULL,
model_version TEXT NOT NULL,
-- Prevent duplicate embeddings for the same message
UNIQUE(contact, body, timestamp)
);
-- Indexes for efficient queries
CREATE INDEX idx_message_embeddings_contact ON message_embeddings(contact);
CREATE INDEX idx_message_embeddings_timestamp ON message_embeddings(timestamp);