Merge "Refactor grid migration" into main