[1.7.x] Revert "Making SQL management commands migration aware."

This reverts commit cb9c9a7b5879671053c7d2ad6e79943a8814b274.

Backport of 83e7555ffee305c1ea1e0655fd1f0aa35269533f from master.