How do you ensure data consistency when integrating a legacy on-premise application with a modern cloud-based system?