存量积累:生图素人感约束+评图分+幂等防重跑+审核回路
- 015-017迁移:image_candidate 文案复审/AI视觉分/重生标记 - constants C7素人感约束(反电商摆拍对齐真实笔记)+C3叠字口子 - celery visibility_timeout=2h 防长任务被误判重投重复烧钱(task75教训) - image_scorer 评图分(只筛选+展示,真实信号才进飞轮权重) - storyboard/image_gen/pipeline_io 生图存量 - task_actions/tasks/task_service/flywheel 审核回路+飞轮存量 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
30
backend/alembic/versions/017_image_candidate_is_regen.py
Normal file
30
backend/alembic/versions/017_image_candidate_is_regen.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""017 image_candidates 表加 is_regen 重生标记(R2 单张/单套重生)
|
||||
|
||||
Revision ID: 017
|
||||
Revises: 016
|
||||
Create Date: 2026-06-12
|
||||
|
||||
R2 单张/单套重生(倩倩姐2026-06-12拍板顺序P0):用户手动重生某张/某套图时,
|
||||
新产出 candidate 一律【新增不删旧】(守"数据归客户可导出"红线 + 飞轮能看到重生信号),
|
||||
用 is_regen 标记区分原始图与重生图。前端同 strategy+role 默认只展示最新那条,
|
||||
若倩倩姐后续要"对比旧图"也能从历史 candidate 取回,方案前后兼容不返工。
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision = "017"
|
||||
down_revision = "016"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
"image_candidates",
|
||||
sa.Column("is_regen", sa.Boolean(), nullable=False, server_default=sa.false(),
|
||||
comment="True=用户手动重生产出(新增不删旧,前端同strategy+role默认只展示最新)"),
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column("image_candidates", "is_regen")
|
||||
Reference in New Issue
Block a user