-- ---------------------------------------------------------------------------
-- Migration: adds an optional %/year depreciation rate to inventory items,
-- as an alternative to entering a useful life in months.
-- ---------------------------------------------------------------------------
-- schema.sql already carries this for FRESH installs. Run this ONCE against
-- an EXISTING database (paste into phpMyAdmin's SQL tab, or
-- `mysql -u <user> -p <db> < sql/migration-2026-07-inventory-depreciation-rate.sql`).
-- Nothing here touches existing rows beyond adding a nullable column.
-- ---------------------------------------------------------------------------

ALTER TABLE inventory_items
  ADD COLUMN depreciation_rate DECIMAL(5,2) NULL AFTER useful_life_months;
