Files
life-echo/api/alembic/versions/0007_drop_chunk_content_tsv.py
Kevin 41518bda11 聊天和回忆录证据检索都走 pgvector,去掉 Postgres FTS/content_tsv,新迁移删掉 content_tsv 列(部署要先 alembic upgrade)。
Embedding 端口增加 is_available(),聊天和回忆录日志用统一方式表示向量是否真能调用。

记忆整理(compaction)支持 Beat 定期扫用户;

事实抽取提示与 subject 归一化,减少同一人多种称呼;
2026-04-03 11:43:16 +08:00

29 lines
732 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""移除 memory_chunks.content_tsvFTS 列已停用,检索统一向量)。
Revision ID: 0007_drop_chunk_content_tsv
Revises: 0006_segment_memoir_phases
"""
from typing import Sequence, Union
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from alembic import op
revision: str = "0007_drop_chunk_content_tsv"
down_revision: Union[str, None] = "0006_segment_memoir_phases"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.drop_column("memory_chunks", "content_tsv")
def downgrade() -> None:
op.add_column(
"memory_chunks",
sa.Column("content_tsv", postgresql.TSVECTOR(), nullable=True),
)