[1.7.x] Fixed #23131 -- Documented serialization of callable functions in migrations.

Backport of 50ae4b4b9e from master