-- Add a separate embeddings table for semantic search and storage of vectors (DuckDB-compatible)
CREATE TABLE IF NOT EXISTS embeddings (
    id INTEGER,
    motion_id INTEGER NOT NULL,
    model TEXT NOT NULL,
    vector JSON NOT NULL,
    created_at TIMESTAMP DEFAULT current_timestamp
);
-- DuckDB does not support AUTOINCREMENT; emulate id via a sequence if needed elsewhere
CREATE SEQUENCE IF NOT EXISTS embeddings_id_seq START 1;
-- Populate id via trigger-like insert pattern is handled by application code (select nextval when inserting)
