This repository has been archived by the owner on Jul 14, 2023. It is now read-only.
Support for full and delta deployments of database fragments (database migrations) #27
Labels
enhancement
New feature or request
By defining the core application within the .cds files, it is super easy to build and enhance an applications data model, as it is fully represented within cds. And this works pretty great until after you have deployed the first version of your application to your production database. From then on, you cannot make a full deployment of your data model anymore but need to only apply the deltas coming from new developments.
CAP has some built in functionality to compile the whole data model into various formats (
cds compile --to
) and even to directly deploy it to SQLite and SAP HANA (cds deploy --to
). While the HANA adapter transforms the data model into HANA specific fragments and then utilizes the HDI deployer to handle the deltas, the SQLite adapter simply drops and recreates all known tables and views... which does not work for production environments.It is therefore mandatory to introduce a new mechanism within this project, that supports initial as well as delta deployments (and could potentially be used by other db adapters as well). The rough requirements would be:
cds deploy --to sqlite
or currentlycds-pg deploy srv --to db
) by leverage existing functionality like the import of csv files, etc.While this can also be handcrafted based on the internal CSN models, there are already tools available that may come in handy like Liqubase (https://www.liquibase.org/) and others.
The text was updated successfully, but these errors were encountered: