-- Empirical DB state (verified via Neon 2026-06-01 against multideal-v2):
--   * 0 rows have avatar_key set            → nothing to migrate out of avatar_key (T16 drop is safe).
--   * 0 rows have avatar_value LIKE 'originals/%' → no real uploads exist.
--   * All 43 GRAVATAR rows hold an 'icon_N' preset in avatar_value (seed data
--     that misused GRAVATAR as a generic slot). None are real gravatar hashes
--     and none are R2 uploads.
-- After this change GRAVATAR means "real gravatar.com (no avatar_value needed)"
-- and UPLOADED means "R2 key". The legacy GRAVATAR rows fit neither — but their
-- avatar_value is already a valid icon name, so reclassifying them to ICON is
-- lossless and truthful (no live users; per project rule, reset stale state, no shim).
UPDATE users
SET avatar_type = 'ICON'
WHERE avatar_type = 'GRAVATAR';
