-- 采购需求关联物料库存（支持多物料，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;
