on 04-14-2023 9:51 AM
Hi everyone,
I have been working on a CAP Node.js project where I have an order entity. My MTA project is deployed to BTP and running successfully.
I made a spelling error in a column of the order entity in schema.cds file. If you look closely, earlier it was 'empdigitialid'. Now I have corrected it to be 'empdigitalid'. After renaming the entity, when I try to deploy the artifacts, it is failing with the following error:
com.sap.hana.di.table: Database error 287: cannot insert NULL or update to NULL: EMPDIGITALID: line 1 col 1 (at pos 0)
Old schema:
Updated schema:
Log file:
Link to log file: cafti-cds-db-deployer.log
Please let me know if you need any other details.
Thanks!!
Hi Mohit
It might be because there is some entry in the table database. Please delete all the database entries and deploy again. It should work.
Regards
Divye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Divye,
Thanks for the clarification.
Yes, there are entries in the database. But, if you see line number 523 of the log file, it says
"CAFTI_ORDER": the table contains data; recreating it and copying the data (STDOUT, APP/TASK/deploy)#"
This shows that CAP takes care of the data itself. It's just that it failed while migrating the DB object, as visible in the next line:
Error: com.sap.hana.di.table: "CAFTI_ORDER": could not migrate the database object [8250019] (STDOUT, APP/TASK/deploy)#
I am really not sure if I am supposed to delete all the entries for making a change to the column name. Do you know of any way to do this without losing the entries of the table?
Thanks for your help!!
Regards,
Mohit
User | Count |
---|---|
72 | |
11 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.