-- Stock alert: minimum stock level per ingredient. When current_stock <= minimum_stock, show as low stock.
-- Run once: mysql -u root -p cmr_ecommerce < database/migrate_ingredient_minimum_stock.sql

USE cmr_ecommerce;

-- Add column only if it does not exist (run once).
ALTER TABLE ingredients
ADD COLUMN minimum_stock DECIMAL(15,3) NULL DEFAULT NULL
COMMENT 'Alert when current_stock is at or below this level; NULL = no alert';
