|
|
@@ -7235,5 +7235,25 @@ private void runMigration100() {
|
|
|
} catch (Exception e) {
|
|
|
log.warn("添加activities.family_scope字段失败: {}", e.getMessage());
|
|
|
}
|
|
|
+
|
|
|
+ // 迁移118: activity_registrations表child_id改为可空 + 添加registrant_name/phone(报名表单-多人报名)
|
|
|
+ try {
|
|
|
+ ensureColumn("activity_registrations", "registrant_name", "VARCHAR(100) COMMENT '报名人姓名'");
|
|
|
+ log.info("已完成activity_registrations.registrant_name字段添加");
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("添加activity_registrations.registrant_name字段失败: {}", e.getMessage());
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ ensureColumn("activity_registrations", "registrant_phone", "VARCHAR(20) COMMENT '报名人联系方式'");
|
|
|
+ log.info("已完成activity_registrations.registrant_phone字段添加");
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("添加activity_registrations.registrant_phone字段失败: {}", e.getMessage());
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ jdbcTemplate.execute("ALTER TABLE activity_registrations MODIFY COLUMN child_id BIGINT COMMENT '孩子ID(手动输入报名人为空)'");
|
|
|
+ log.info("已完成activity_registrations.child_id改为可空");
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("修改activity_registrations.child_id失败: {}", e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
}
|