-- A user's profile picture: one already-cropped, re-encoded 256x256 PNG per -- user. Kept in Postgres rather than on a volume so every replica serves it and -- the pg_dump backup covers it. updated_at is in milliseconds, not seconds like -- the other timestamps, because it doubles as the cache-busting version of the -- image URL and a re-upload within the same second must change it. CREATE TABLE user_avatars ( user_id bigint PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE, data bytea NOT NULL, updated_at bigint NOT NULL );