cancel
Showing results for 
Search instead for 
Did you mean: 

HANA deployment hdbtable check constraints

florin1335
Explorer
0 Kudos
103

Hi,

I have a CAP application and I wanted to create a .hdbtable artifact manually in order to add some constraints.

 

 

COLUMN TABLE TEST (
  ID NVARCHAR(36),
  QUANTITY INTEGER NOT NULL,
  CONSTRAINT POSITIVE_QUANTITY CHECK ( QUANTITY > 1 ),
  PRIMARY KEY(ID)
)

 

 

Cds deploy is failing with error:

 

 

Error: com.sap.hana.di.table: "db://POSITIVE_QUANTITY": this artifact type must not provide additional named objects besides the artifact's main object

 

 

Creating the table in the database explorer works. After checking the documentation it looks like for .hdbtable, named constraints are not supported. I checked .hdbconstraint as well but that supports only foreign key constraints. How can I achieve this very basic requirement, is there another artifact which would help?

 

Accepted Solutions (0)

Answers (0)