Files
beige/backend/alembic/versions/009_benchmark_analyze_fields.py
yangqianqian 6a2632da70 baseline: Clover 独立仓库首次基线提交
将 Clover 从上层产品包旧仓库中独立出来,建立专属版本控制。
当前状态=纵切片端到端已打通(登录→选品→出文出图→审核→下载包),
M1文案质量去套路化已验收。此提交作为后续按核销清单逐条修复的基线。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 11:30:22 +08:00

45 lines
1.0 KiB
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.
"""add features_json and analyze_status to benchmark_notes
Revision ID: 009
Revises: 008
Create Date: 2026-06-13
第2环标杆分析字段
- features_json: 存储8特征结构化分析结果TEXT JSON
- analyze_status: AI分析状态机 pending/analyzing/done/failed
"""
from alembic import op
import sqlalchemy as sa
revision = "009"
down_revision = "008"
branch_labels = None
depends_on = None
def upgrade():
op.add_column(
"benchmark_notes",
sa.Column(
"features_json",
sa.Text,
nullable=True,
comment="爆款8特征分析结果JSON第2环AI解析后写入",
),
)
op.add_column(
"benchmark_notes",
sa.Column(
"analyze_status",
sa.String(20),
nullable=False,
server_default="pending",
comment="AI分析状态: pending/analyzing/done/failed",
),
)
def downgrade():
op.drop_column("benchmark_notes", "analyze_status")
op.drop_column("benchmark_notes", "features_json")