[1.7.x] Fixed #22511 -- Added args to migrations management commands.

Backport of 83413c53d2 from master