cds-dbm icon indicating copy to clipboard operation
cds-dbm copied to clipboard

Multiple Postgres Database Projects cause reference schema to be overwrtten

Open dus2001 opened this issue 1 year ago • 2 comments

Hello,

Multiple projects being deployed to same postgres database on Cloud Foundry cause the reference schema to be overwritten and dropping of CDS views for other project.

I have two projects both deploying to same postgres database in cloud foundry. At the time of deploy I am not able to specify the dbname. This causes both projects to refer to same database. The reference schema provided in the package.json of each project is not honored. This particular code is not going inside the if statement.

image Each MTA file deployed on cloud foundry work independently. But the moment I deploy the second MTA the CDS views for the first MTA are getting deleted due to shared reference schema. And hence the first MTA stops function after second MTA deploy.

Please help

dus2001 avatar Mar 18 '23 22:03 dus2001

Workaround for above problem: Get the script for the deploy generated view from the postgres console. Save the scripts.

Every time a deploy wipes out the views, regenerate them using the saved script. Remember to get an udpated script every time the view updated for a project.

dus2001 avatar Mar 19 '23 21:03 dus2001

Any update on this please? I have multiple CAP projects in postgres DB and deploy a project causes the views of other projects to be dopped.

dus2001 avatar Apr 01 '23 05:04 dus2001