naco-api/sql/schema/002_user_style_profiles.sql
2025-12-02 19:33:03 +00:00

16 lines
No EOL
471 B
SQL

-- +goose up
CREATE TABLE user_style_profiles (
id BIGSERIAL PRIMARY KEY,
user_id TEXT NOT NULL,
platform TEXT NOT NULL,
embedding VECTOR(768) NOT NULL,
top_keywords TEXT[] NOT NULL,
style_summary TEXT NOT NULL,
post_count INTEGER NOT NULL,
modified_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
UNIQUE (user_id, platform)
);
-- +goose down
DROP TABLE IF EXISTS user_style_profiles;