[1.7.x] Making SQL management commands migration aware.
[1.7.x] Fix test failure caused by 3149cdce32e7261b2d44128ab712c4d4f1a5d429