Handle migration of old format to new