-- =====================================================
-- mdm_item 表新增字段：辅单位、默认仓库
-- 执行时间：2026-07-01
-- =====================================================

ALTER TABLE `mdm_item`
    ADD COLUMN `unit_measure_id2` bigint DEFAULT NULL COMMENT '辅单位1编号' AFTER `unit_measure_id`,
    ADD COLUMN `unit_measure_rate1` decimal(24,6) DEFAULT NULL COMMENT '辅单位1换算比率' AFTER `unit_measure_id2`,
    ADD COLUMN `unit_measure_id3` bigint DEFAULT NULL COMMENT '辅单位2编号' AFTER `unit_measure_rate1`,
    ADD COLUMN `unit_measure_rate2` decimal(24,6) DEFAULT NULL COMMENT '辅单位2换算比率' AFTER `unit_measure_id3`,
    ADD COLUMN `warehouse_id` bigint DEFAULT NULL COMMENT '默认仓库编号' AFTER `unit_measure_rate2`,
    ADD COLUMN `warehouse_code` varchar(50) DEFAULT NULL COMMENT '默认仓库编码' AFTER `warehouse_id`;
