[#44979413] Move duplicate schema cleanup logic into migration