-- Adds "Grade Twin" (twin-yolk eggs) as a new egg grade, ranked ahead of
-- Grade A everywhere grades are recorded, sold, or reported on.
-- schema.sql already carries these for FRESH installs. Run this ONCE against
-- an EXISTING database. Existing rows default to 0 / unaffected — nothing
-- already recorded changes meaning.

ALTER TABLE egg_collections
  ADD COLUMN grade_twin INT UNSIGNED NOT NULL DEFAULT 0 AFTER total;

ALTER TABLE egg_usage
  MODIFY COLUMN grade ENUM('gradeTwin','gradeA','gradeB','cracked','dirty','rejected','mixed') NOT NULL DEFAULT 'mixed';

ALTER TABLE sale_items
  MODIFY COLUMN grade ENUM('gradeTwin','gradeA','gradeB','cracked','dirty','rejected','mixed') NULL;
