Files
fad_oa/sql/requirement_add_material.sql
2026-06-13 15:37:10 +08:00

8 lines
524 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 采购需求关联物料库存支持多物料CSV
ALTER TABLE oa_requirements
ADD COLUMN material_ids VARCHAR(1000) DEFAULT NULL COMMENT '关联物料ID CSV -> sys_oa_warehouse.id' AFTER project_id;
-- 已应用过单物料版本material_id的环境执行下面这句把旧字段迁移并删除
-- UPDATE oa_requirements SET material_ids = CAST(material_id AS CHAR) WHERE material_id IS NOT NULL AND (material_ids IS NULL OR material_ids = '');
-- ALTER TABLE oa_requirements DROP COLUMN material_id;