on 11-30-2023 9:51 AM
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 ?
I would suggest you try locally with my example project mtxs-bookshop and the sample REST Client script:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.