|
|
@@ -3638,6 +3638,26 @@ insertSysConfigSeed("gift_membership_pay_price", "198000", "送会员商品达
|
|
|
|
|
|
// 迁移497: 创建家庭关系类型字典表(SC-A-04 关系类型 CRUD,能力键 admin.familyRelation.manage)
|
|
|
createFamilyRelationTypesTable();
|
|
|
+
|
|
|
+ // 迁移498: user_operation_logs 加宽 operation_type 20 → 64(S-cfc-402 收货超时自动完成
|
|
|
+ // 写入 product_order_auto_complete 27 字符 > 原列宽 20,触发 Data truncation,
|
|
|
+ // 操作日志缺失)。幂等:MODIFY 可重复执行(已是 64 时语义等价 no-op)。
|
|
|
+ widenUserOperationLogType();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 迁移498: user_operation_logs.operation_type 加宽 20 → 64(能力键 shop.order.receiptTimeout)。
|
|
|
+ *
|
|
|
+ * <p>生产已手动 ALTER(2026-11-16 部署验证时截断报错),本迁移保证新建库/下次部署口径一致。</p>
|
|
|
+ */
|
|
|
+ private void widenUserOperationLogType() {
|
|
|
+ try {
|
|
|
+ jdbcTemplate.execute("ALTER TABLE user_operation_logs MODIFY COLUMN operation_type VARCHAR(64) NOT NULL "
|
|
|
+ + "COMMENT '操作类型: login/logout/create/update/delete/query等; product_order_auto_complete 等长类型'");
|
|
|
+ log.info("迁移498: user_operation_logs.operation_type 已加宽至 64");
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("迁移498: user_operation_logs.operation_type 加宽失败(忽略): {}", e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|