Fixed #22940 -- Added missing string iterpolation parameters in migrations.writer error.

Forwardport of f5740af868 from stable/1.7.x