|
|
@@ -1792,7 +1792,8 @@ public class DatabaseInitializer implements CommandLineRunner {
|
|
|
log.warn("创建 health_report_survey 表失败: {}", e.getMessage());
|
|
|
}
|
|
|
|
|
|
- // ==================== 精准营养 P0: health_gut_flora + health_disease_risk ============= try {
|
|
|
+ // ==================== 精准营养 P0: health_gut_flora + health_disease_risk =============
|
|
|
+ try {
|
|
|
jdbcTemplate.execute("CREATE TABLE IF NOT EXISTS health_gut_flora (" +
|
|
|
"id BIGINT AUTO_INCREMENT PRIMARY KEY, " +
|
|
|
"report_id BIGINT NOT NULL COMMENT '关联报告ID', " +
|
|
|
@@ -11047,6 +11048,14 @@ sqls.add("INSERT IGNORE INTO health_norm_reference (dimension, gender, age_min,
|
|
|
} catch (Exception e) {
|
|
|
log.warn("迁移319: 插入 health_plan 提示词种子数据失败: {}", e.getMessage());
|
|
|
}
|
|
|
+
|
|
|
+ // 迁移320: exercise_record 表添加 step_count 列(微信运动步数同步)
|
|
|
+ try {
|
|
|
+ jdbcTemplate.execute("ALTER TABLE exercise_record ADD COLUMN step_count INT COMMENT '微信运动步数'");
|
|
|
+ log.info("迁移320: exercise_record.step_count 列已添加");
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("迁移320: exercise_record.step_count 列已存在或添加失败: {}", e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|