-- ---------------------------------------------------------------------------
-- Migration: add 'missing' as a manual usage reason (birds & eggs)
-- ---------------------------------------------------------------------------
-- schema.sql already carries the new ENUM values for FRESH installs. Run this
-- ONCE against an EXISTING database (e.g. paste into phpMyAdmin's SQL tab, or
-- `mysql -u <user> -p <db> < sql/migration-2026-07-add-missing-usage-reason.sql`)
-- to widen the reason columns in place. It only adds a value to each ENUM, so
-- it never touches or loses existing rows.
-- ---------------------------------------------------------------------------

ALTER TABLE egg_usage
  MODIFY reason ENUM('sold','donated','consumed','missing','other') NOT NULL;

ALTER TABLE bird_usage
  MODIFY reason ENUM('donated','consumed','missing','other') NOT NULL;
