cancel
Showing results for 
Search instead for 
Did you mean: 

It is possible to deploy two CAP Apps to the same PostgreSQL database in Cloud Foundry?

03-06-2026 2:58 PM
438 views 0 comments
0 Likes
SAP Managed Tags
Subscribe

Hi everyone,

Me and my colleagues are new to CAP development, we are using tutorials and the documentation as source for our first steps. We were able already to create and deploy one CAP App on Cloud Foundry, connected to one PosgtreSQL Instance, which is working like a charm.

However now we need to build a second app, which has a different schema.cds file. We built it, tested it locally (in memory database), but when we try to deploy it, we always receive one error related to a DROP TABLE command.

[PollExecuteTaskStatusExecution] 09...e [2026-03-04T15:47:40.269285] /> deployment to postgres-3...ws.com:8501 failed (STDOUT, APP/TASK/deploy-to-postgresql)#
[PollExecuteTaskStatusExecution] 09...ee [2026-03-04T15:47:40.270089] Error: CDS compilation failed (@sap/cds-compiler v6.7.3) (STDERR, APP/TASK/deploy-to-postgresql)#
#2026 03 04 15:47:44.785#Z#DEBUG#43...-postgres-deployer#flowable-async-job-executor-thread-33947#
[PollExecuteTaskStatusExecution] 093...e [2026-03-04T15:47:40.270114] Error: Dropping tables is not supported (in artifact:“db.BusinessCaseHeaderConfig”) (STDERR, APP/TASK/deploy-to-postgresql)#

 

The db.BusinessCaseHeaderConfig is actually one table of our other app.

As a workaround for this, we added at the mta.yaml, at the cap service configuration the following PG configuration:

    properties:
      PGOPTIONS: -c search_path=workflowconfig,public
 
In this way, we force our app to use a different schema, which we had to create manually at the PostgreSQL Instance.
 
I would like to know if is there any other way to do the deployment of two CAP Apps, with different schemas into the same PostgreSQL and schema?
Does anyone has experience with that? Is that even possible?

We saw that the content of the table cds_model is what contain the model information, we think that here is the problem, this table only accepts one line, therefore only one app.

BR
Eduardo
0 Likes

Accepted Solutions (0)

Answers (0)