上线版: 产品表单统一+form嵌套修复+用户管理+部署+三套叙事
- 产品编辑入口统一走 ProductFormFull(卖点/风格/人群/品牌词全字段); 修复开任务页 <form> 套 <form> 致"编辑产品"报错、改不了、跳回首个产品 - dashboard 入口卡片对齐实际路由: 系统管理(/config) 与 工作配置(/settings) 分开; settings ?tab=products 直达改用挂载后读 URL, 消除 hydration mismatch - 新增用户管理(users API/admin service/改密页) + alembic 022/023/024 - 上线部署: Dockerfile / docker-compose.prod+https / nginx https / .env.example - A8 三套正交叙事(痛点/场景/成分背书) + beige 调色去AI化 + 飞轮 text_import 高权重信号 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
24
backend/alembic/versions/022_user_must_change_password.py
Normal file
24
backend/alembic/versions/022_user_must_change_password.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""022 users 表加 must_change_password 首登改密标记
|
||||
|
||||
Revision ID: 022
|
||||
Revises: 021
|
||||
Create Date: 2026-06-29
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision = "022"
|
||||
down_revision = "021"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
"users",
|
||||
sa.Column("must_change_password", sa.Boolean(), nullable=False, server_default=sa.false()),
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column("users", "must_change_password")
|
||||
@@ -0,0 +1,47 @@
|
||||
"""023 benchmark link and screenshot fields use text
|
||||
|
||||
Revision ID: 023
|
||||
Revises: 022
|
||||
Create Date: 2026-06-29
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision = "023"
|
||||
down_revision = "022"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column(
|
||||
"benchmark_notes",
|
||||
"screenshot_url",
|
||||
existing_type=sa.String(length=512),
|
||||
type_=sa.Text(),
|
||||
existing_nullable=True,
|
||||
)
|
||||
op.alter_column(
|
||||
"benchmark_notes",
|
||||
"link_url",
|
||||
existing_type=sa.String(length=512),
|
||||
type_=sa.Text(),
|
||||
existing_nullable=True,
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.alter_column(
|
||||
"benchmark_notes",
|
||||
"link_url",
|
||||
existing_type=sa.Text(),
|
||||
type_=sa.String(length=512),
|
||||
existing_nullable=True,
|
||||
)
|
||||
op.alter_column(
|
||||
"benchmark_notes",
|
||||
"screenshot_url",
|
||||
existing_type=sa.Text(),
|
||||
type_=sa.String(length=512),
|
||||
existing_nullable=True,
|
||||
)
|
||||
35
backend/alembic/versions/024_signal_type_text_import.py
Normal file
35
backend/alembic/versions/024_signal_type_text_import.py
Normal file
@@ -0,0 +1,35 @@
|
||||
"""024 preference_events.signal_type ENUM 补 text_import(飞轮④导入文案信号)
|
||||
|
||||
Revision ID: 024
|
||||
Revises: 023
|
||||
Create Date: 2026-06-29
|
||||
|
||||
signal_type 是 MySQL ENUM,原6值无导入信号。导入文案=客户实跑验证过、跑得好的范本
|
||||
(倩倩姐2026-06-26拍板),记 text_import 信号且权重高于改稿/AI选稿。
|
||||
不补 ENUM 直接插 text_import 会 Data truncated。
|
||||
"""
|
||||
from alembic import op
|
||||
|
||||
revision = "024"
|
||||
down_revision = "023"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
_ENUM_WITH_IMPORT = (
|
||||
"ENUM('text_select','image_select','approve','reject_with_reason',"
|
||||
"'regenerate','text_edit','text_import') NOT NULL"
|
||||
)
|
||||
_ENUM_ORIG = (
|
||||
"ENUM('text_select','image_select','approve','reject_with_reason',"
|
||||
"'regenerate','text_edit') NOT NULL"
|
||||
)
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.execute(f"ALTER TABLE preference_events MODIFY COLUMN signal_type {_ENUM_WITH_IMPORT}")
|
||||
|
||||
|
||||
def downgrade():
|
||||
# 回退前先删 text_import 行,避免落在旧 ENUM 外越界(这些是新功能信号,旧版本本不该有)
|
||||
op.execute("DELETE FROM preference_events WHERE signal_type='text_import'")
|
||||
op.execute(f"ALTER TABLE preference_events MODIFY COLUMN signal_type {_ENUM_ORIG}")
|
||||
Reference in New Issue
Block a user