Last modified: 11-11-2022
Abstract
This paper concerns the task of automatic generation of migrations based on changes in entity models. Situations where projects are using raw SQL queries alongside with ORMs, which provide some useful automations and an additional level of abstraction over the database driver, are not rare. ORM is a programming method in which a metadata descriptor is used to connect object code to a relational database. Object code is written in object-oriented programming (OOP), such as Java or C #. ORM converts data between type systems that cannot coexist in relational databases and OOP languages.The advantages of ORM also include: simplified development because it automates the conversion of object to table and table to object, resulting in lower development and maintenance costs, less code compared to embedded SQL and handwritten stored procedures, transparent caching of objects at the application level, improving system performance, an optimized solution that makes the application faster and easier to maintain In this case, after creating or updating entity data model in code, the common solution would be manually creating a migration which does the same modification to table on database level. The alternative solution with automated migrations generation is proposed. The ways for further improvements are suggested as well..