Upgrading an Existing Data Model Project
If you have created your own data model project that uses the CDS data model (as a reusable database module based on the SAP WebIDE template), we recommend that you use the SAP WebIDE template to upgrade to the newest version of the SAP reusable database module.
To upgrade your existing project, do the following steps. We recommend that you first upgrade and test using sample data in SAP Web IDE. You need deploy mtar in a system that already contains test data.
-
Check out your existing project into SAP Web IDE (from Git). We recommend that you keep your project in source code versioning.
-
Install the new template in accordance with the installation steps described in Installing or Upgrading the Template to Use or Extend the Data Model.
-
Delete the folder of the old version in the folder sap-datamodel of your existing project ():

-
Create a new project from the new template. Go to the Development section and choose .
- Copy and paste data from the template to your folder sap-datamodel.
- Copy and paste the folder for the latest version under .

In your folder sap-datamodel .
- Copy and paste the folder the same way.
- Copy and paste the folder the same way. This folder is relevant, if you use the NPM Registry for installing or upgrading an existing data model.
- Copy and paste the folder for the latest version under .
-
Update db/package.json with the new version. If you did not change your package.json, you can copy it from the new template. Otherwise, edit package.json and replace the existing version of @sap_fsdm/cds_datamodel with the new version.
-
Delete the generated interface folder under src:

-
Test the upgrade of the data model on SAP HANA on a container with test data. You can do this either in SAP Web IDE using a build on the db folder, or on the command line using xs deploy on test data.
- Regenerate the interfaces as described in Deploying the Generated Write or Read Interface to SAP HANA XS Advanced Runtime.
- Import the zip file under .
- Build at DB level.
Related Links
| Location | Content |
|---|---|
| Installing and Updating Using the XS Advanced Application Lifecycle Management Graphical User Interface | Installation and upgrade description |
| Extensibility Information | Extensibility information within this guide |

