naco-api/sql/schema/002_user_style_profiles.sql
Nacorid 5574a8596f db: update embedding dimension to 1024 for qwen3-embedding:0.6b
- Migration 002: VECTOR(768) -> VECTOR(1024) to match qwen3-embedding:0.6b default output
- integration_test.go: update test vector from 768 to 1024 dimensions
2026-09-02 00:00:10 +02:00

20 lines
No EOL
560 B
SQL

-- +goose up
CREATE EXTENSION IF NOT EXISTS vector;
CREATE TABLE IF NOT EXISTS user_style_profiles (
id BIGSERIAL PRIMARY KEY,
user_id TEXT NOT NULL,
platform TEXT NOT NULL,
embedding VECTOR(1024) 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;
DROP EXTENSION IF EXISTS vector;