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.

  1. Check out your existing project into SAP Web IDE (from Git). We recommend that you keep your project in source code versioning.

  2. Install the new template in accordance with the installation steps described in Installing or Upgrading the Template to Use or Extend the Data Model.

  3. Delete the folder of the old version in the folder sap-datamodel of your existing project (Start of the navigation pathRight-click Next navigation step Edit Next navigation step DeleteEnd of the navigation path):

  4. Create a new project from the new template. Go to the Development section and choose Start of the navigation pathFile Next navigation step New Next navigation step Project from TemplateEnd of the navigation path.

  5. Copy and paste data from the template to your folder sap-datamodel.
    1. Copy and paste the folder for the latest version under Start of the navigation pathWorkspace Next navigation step db Next navigation step sap-datamodel Next navigation step Version number (for example 1.9.0)End of the navigation path.

      Start of the navigation pathRight-click Next navigation step Edit Next navigation step CopyEnd of the navigation path

      In your folder sap-datamodel Start of the navigation pathRight-click Next navigation step Edit Next navigation step PasteEnd of the navigation path.

    2. Copy and paste the folder Start of the navigation pathWorkspace Next navigation step db Next navigation step undeploy.jsonEnd of the navigation path the same way.
    3. Copy and paste the folder Start of the navigation pathWorkspace Next navigation step db Next navigation step .npmrcEnd of the navigation path the same way. This folder is relevant, if you use the NPM Registry for installing or upgrading an existing data model.
  6. 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.

  7. Delete the generated interface folder under src: Start of the navigation pathRight-click Next navigation step Edit Next navigation step DeleteEnd of the navigation path

  8. 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.

  9. Regenerate the interfaces as described in Deploying the Generated Write or Read Interface to SAP HANA XS Advanced Runtime.
  10. Import the zip file under Start of the navigation pathdb Next navigation step src Next navigation step interfaceEnd of the navigation path.
  11. 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