cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

dropping fields in postgres db

syedimran
Explorer
705

Hello Experts

I am building a project using SAP CAP and database is postgres. I am getting error 'Dropping fields is not allowed' when i  am trying to remove a field from the table. Is there any to force delete using cds deploy ?

I have tried to delete the column using SQL ( column gets deleted) but still deploy error, Probably it is storing the info in csn.

Error: CDS compilation failed (@sap/cds-compiler v5.6.0)
db/schema.cds:10:8: Error: Dropping elements is not supported (in entity:“com.cades.Invoices”/element:“AccessKey1”)
at throwWithAnyError (/home/syed-imran/myfolder/monitor-ts/node_modules/@sap/cds-compiler/lib/base/messages.js:585:13)
at Proxy.toSqlDdl (/home/syed-imran/myfolder/monitor-ts/node_modules/@sap/cds-compiler/lib/render/toSql.js:283:3)
at sqlMigration (/home/syed-imran/myfolder/monitor-ts/node_modules/@sap/cds-compiler/lib/api/main.js:594:13)
at Function.api [as migration] (/home/syed-imran/myfolder/monitor-ts/node_modules/@sap/cds-compiler/lib/api/main.js:1154:22)
at Function.migration (/home/syed-imran/myfolder/monitor-ts/node_modules/@sap/cds-compiler/lib/main.js:144:41)
at Object.deltaSql (/home/syed-imran/myfolder/monitor-ts/node_modules/@sap/cds/lib/compile/cdsc.js:162:53)
at Function.cds_compile_to_deltaSql [as delta] (/home/syed-imran/myfolder/monitor-ts/node_modules/@sap/cds/lib/compile/to/sql.js:38:59)
at deploy.schema (/home/syed-imran/myfolder/monitor-ts/node_modules/@sap/cds/lib/dbs/cds-deploy.js:75:75)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /home/syed-imran/myfolder/monitor-ts/node_modules/@sap/cds/lib/dbs/cds-deploy.js:39:19

Accepted Solutions (0)

Answers (0)