Showing results for 
Search instead for 
Did you mean: 

Deploy database with CAPM to PostgreSQL instance with existing database



I'm trying to deploy postgresql database with CAPM into postgresql instance in CF with already existing database.

Is it possible to have multiple databases in the same instance? And can I somehow set the database name that should be created?

I tried to set the name in package.json within db credentials, also manually created the database but still could not connect to it.

Currently it always tries to deploy into the first created database, but it fails with an error:

Errors by cds.compile ...
in undefined:undefined:undefined — Error: Dropping tables is not supported
at throwWithAnyError (/home/vcap/app/node_modules/@sap/cds-compiler/lib/base/messages.js:513:13)
at Proxy.toSqlDdl (/home/vcap/app/node_modules/@sap/cds-compiler/lib/render/toSql.js:256:3)
at sqlMigration (/home/vcap/app/node_modules/@sap/cds-compiler/lib/api/main.js:478:13)
at Function.api [as migration] (/home/vcap/app/node_modules/@sap/cds-compiler/lib/api/main.js:905:22)
at Function.migration (/home/vcap/app/node_modules/@sap/cds-compiler/lib/main.js:140:41)
at Object.deltaSql (/home/vcap/app/node_modules/@sap/cds/lib/compile/cdsc.js:136:53)
at Function.cds_compile_to_deltaSql [as delta] (/home/vcap/app/node_modules/@sap/cds/lib/compile/to/sql.js:24:59)
at Function.cds_deploy_create [as create] (/home/vcap/app/node_modules/@sap/cds/lib/dbs/cds-deploy.js:83:75)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async _deploy (/home/vcap/app/node_modules/@sap/cds/lib/dbs/cds-deploy.js:37:19)

Thank you.

View Entire Topic
0 Kudos


I'm having the same problem right now: I'd like to specify the deployment destination database but I can't do it and the application just deploys in the default database. Can I ask you if you ever found a solution to your problem? Thanks in advance.

Best regards,

0 Kudos
Hello, no I have not found a solution. However I got a response from support saying: we currently do not support multiple database containers within the same physical instances, because Postgres can not ensure resource isolation between the different database containers. So I dont think there can be done anything about it. Hope it helps.