|
@@ -8563,6 +8563,15 @@ private void runMigration100() {
|
|
|
// 迁移226: products 添加 growth_category 列(成长分类筛选,Product 实体已含字段,生产库缺列导致 Unknown column 'growth_category')
|
|
// 迁移226: products 添加 growth_category 列(成长分类筛选,Product 实体已含字段,生产库缺列导致 Unknown column 'growth_category')
|
|
|
ensureColumn("products", "growth_category", "VARCHAR(50) DEFAULT NULL COMMENT '成长分类'");
|
|
ensureColumn("products", "growth_category", "VARCHAR(50) DEFAULT NULL COMMENT '成长分类'");
|
|
|
|
|
|
|
|
|
|
+ // 迁移227: product_skus.id 升级为 BIGINT(生产库为 INT,插入超出 INT 范围的 id 报 Out of range value for column 'id')
|
|
|
|
|
+ try {
|
|
|
|
|
+ jdbcTemplate.execute("ALTER TABLE product_skus MODIFY COLUMN id BIGINT AUTO_INCREMENT");
|
|
|
|
|
+ jdbcTemplate.execute("ALTER TABLE product_skus MODIFY COLUMN product_id BIGINT NOT NULL COMMENT '所属商品ID'");
|
|
|
|
|
+ log.info("product_skus.id/product_id 已升级为 BIGINT");
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.warn("product_skus.id/product_id 升级失败(可能已修改): " + e.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 迁移209: 创建 survey_templates 表(定期调研模板)
|
|
// 迁移209: 创建 survey_templates 表(定期调研模板)
|
|
|
try {
|
|
try {
|
|
|
jdbcTemplate.execute(
|
|
jdbcTemplate.execute(
|