[#3213] Background migration infrastructure refactoring.