Tags:Ampersand, Data migration, Generative software, Incremental software deployment, Invariants, Relation algebra, Schema change and Zero downtime
Abstract:
Software generators that compile and deploy a specification into a functional information system can help to increase the frequency of releases in the software process. They achieve this by reducing development time and minimizing human-induced errors. However, many software generators lack support for data migration. This can inhibit a steady pace of releases, especially for increments that alter the system’s schema in production. Consequently, schema-changing data migrations often face challenges, leading developers to resort to manual migration or employ workarounds. To address this issue, this paper proposes a foundational approach for data migration, aiming to generate migration scripts for automating the migration process. The overarching challenge is preserving the business semantics of data amidst schema changes. Specifically, this paper tackles the task of generating a migration script based on the schemas of both the existing and the desired system, under the condition of zero down-time. The proposed solution was validated by a prototype demonstrating its efficacy. Notably, the approach is technology-independent, articulating systems in terms of invariants, thereby ensuring applicability across various scenarios. The migration script generator will be implemented in a software generator named Ampersand.