feat: v1.4.0 - 典型方案采纳、推荐方案列表、审计字段、导航优化
- 添加典型方案采纳功能 (POST /api/plans/<id>/adopt) - 添加推荐方案列表 (GET /api/students/<id>/recommended-plans) - PracticePlan 新增 created_by/updated_by/updated_at 审计字段 - 方案编辑/详情页导航优化 (bfcache 处理、pageshow 事件) - 方案列表支持删除功能 - 学员列表'暂无方案/问题'样式统一 - 更新文档:问题文件已废弃(迁移到数据库) - 更新部署脚本和验证清单
This commit is contained in:
@@ -125,6 +125,17 @@ def create_app():
|
||||
db.session.execute(text("ALTER TABLE practice_plans ADD COLUMN is_typical INTEGER DEFAULT 0"))
|
||||
db.session.commit()
|
||||
|
||||
# 检查practice_plans表是否有created_by字段
|
||||
if "created_by" not in plan_columns2:
|
||||
db.session.execute(text("ALTER TABLE practice_plans ADD COLUMN created_by INTEGER REFERENCES users(id)"))
|
||||
db.session.commit()
|
||||
if "updated_by" not in plan_columns2:
|
||||
db.session.execute(text("ALTER TABLE practice_plans ADD COLUMN updated_by INTEGER REFERENCES users(id)"))
|
||||
db.session.commit()
|
||||
if "updated_at" not in plan_columns2:
|
||||
db.session.execute(text("ALTER TABLE practice_plans ADD COLUMN updated_at TIMESTAMP"))
|
||||
db.session.commit()
|
||||
|
||||
# 检查goals表是否有level字段
|
||||
result7 = db.session.execute(text("PRAGMA table_info(goals)"))
|
||||
goal_columns = [row[1] for row in result7]
|
||||
|
||||
Reference in New Issue
Block a user