Follow-up from #6. Before #6, PhotoMealUpload.saveMeal wrote base_* per Gemini portion (base_portion_size g) instead of per 100 g, and search selections with quantity>1 wrote base_* multiplied by quantity with portion_size=100.
- Photo rows CAN be repaired: base_portion_size is stored, so base_* = base_* * 100 / base_portion_size where base_portion_size != 100.
- Search rows CANNOT be derived (quantity was not stored); at most flag them.
Deliverable: backend/migrations/0XX_repair_meal_components_base.sql (idempotent, guarded), documented as manual-apply in docs/02-database-setup.md; never run from CI.
Follow-up from #6. Before #6, PhotoMealUpload.saveMeal wrote base_* per Gemini portion (base_portion_size g) instead of per 100 g, and search selections with quantity>1 wrote base_* multiplied by quantity with portion_size=100.
Deliverable: backend/migrations/0XX_repair_meal_components_base.sql (idempotent, guarded), documented as manual-apply in docs/02-database-setup.md; never run from CI.