feat(migr): Correct migr query (fixes #4032)