commit content

This commit is contained in:
panchengyong
2026-03-06 02:02:59 +08:00
parent 99b07682e7
commit c28ada5050
733 changed files with 128794 additions and 248 deletions

View File

@@ -0,0 +1,19 @@
-- ============================================================
-- 为 md_bom 表添加 item_spec 字段
-- 说明: 修复字段缺失问题item_spec作为冗余字段存储产品物料规格
-- 生成日期: 2026-01-26
-- 兼容 MySQL 5.7+
-- ============================================================
SET NAMES utf8mb4;
-- 添加 item_spec 字段
ALTER TABLE `md_bom`
ADD COLUMN `item_spec` varchar(200) DEFAULT NULL COMMENT '产品物料规格 (冗余字段)'
AFTER `item_name`;
-- 更新现有数据从md_item表同步item_spec
UPDATE `md_bom` b
INNER JOIN `md_item` i ON b.item_id = i.item_id
SET b.item_spec = i.specification
WHERE b.item_spec IS NULL;