cancel
Showing results for 
Search instead for 
Did you mean: 

CAP CDS Multitenancy Streamline (cds-mtxs) not working for upgrade or subscription of tenant

joaopereira1
Explorer
0 Kudos

Hi we are building a multitenant CAP application , following the advice of andrew.lunde in his BTP Multitenant: Getting Started - YouTube video series.

We have noticed that on on/offboarding subscription of tenants the schema gets destroyed just like Sergei Haller noticed in this question : https://answers.sap.com/questions/13145871/cap-cds-multitenancy-cds-mtx-rollout-db-changes.html

The solution he found was to use the mtx/v1/model/asyncUpgrade endpoint of the REST API

According to Documentation here: https://cap.cloud.sap/docs/guides/multitenancy

However that would be for the old mtx and since I am using the cds-mtxs, the way to that I would believe would be to do a /cds/deployment/upgrade according to the same documentation for the new mtxs. However I
am receiving a 204 No content response and nothing is changing for that specific tenant after I do
the REST API call. This is the way I am doing the request:
(first I obtain the XsuaaToken and then use it to do the upgrade)



Am I missing something ? Or is there another way to change a specific's tenant code without
losing their schema ?

Accepted Solutions (1)

Accepted Solutions (1)

gregorw
Active Contributor

I would suggest you try locally with my example project mtxs-bookshop and the sample REST Client script:

test/SaasProvisioningService-02-upgrade.http

Answers (2)

Answers (2)

Dinu
Contributor

If you only want to update the schema changes in the deployed application, you can simply update the subscription from the SaaS Subscription Management Dashboard. This is for getting the upgrade done and not for exploring the APIs. This is the video in the series showing it: BTP Multitenant - Subscription Management Dashboard - YouTube

Note: SQLite will drop and create the tenant database according to documentation.

joaopereira1
Explorer
0 Kudos

Thank you very much for the answers, I actually was doing everything right except the fact that in the POST the correct url is : POST {{srvUrl}}/-/cds/saas-provisioning/upgrade

I mixed the url's from two different sources of information so that was the problem.