-- Migration 021: Allow NULL for quantity_per_unit in bom_items
-- This migration allows quantity_per_unit to be NULL for dimension-based items

-- Change quantity_per_unit to allow NULL
ALTER TABLE `bom_items`
MODIFY COLUMN `quantity_per_unit` DECIMAL(12, 3) NULL
COMMENT 'Quantity per unit (for quantity-based RM like buttons, zippers). NULL for dimension-based items.';

-- Verify the change
DESCRIBE bom_items;
