Drop Unique Constraint
You can drop a unique constraint along with its unique constraint metadata and physical unique constraint from the system by sending the following request. Drop unique constraint will be equivalent to delete a unique constraint definition. Either you want to drop a simple unique constraint or a composite unique constraint the request will be same. Once you drop a unique constraint then you cannot recover it again but you can create it again with the add unique constraint request.
Following are the conditions which should be met by the request to drop the unique constraint.
-
Main request will be for `BUS OBJ ATTR UNIQ CONSTRAINTS' business object.
-
You can drop a unique constraint only by constraint name.
-
This constraint name must exist in the database and in the metadata.
-
For composite unique constraint you only need to specify the constraint name one and all the unique constraint metadata records for this composite unique constraint will be deleted together using a single request.
-
If the given unique constraint name does not exist then the response will be an error.
-
Constraint name is the database physical constraint name which can be seen from the database browser as well.
-
If the physical constraint does not exist in database then database will throw an error.
4. Request body
Drop Simple Unique Constraint Using Constraint Name Request
{
"BUS OBJ ATTR UNIQ CONSTRAINTS": {
"language": "en",
"timezone": "GMT+08:00",
"data": [
{
"CONSTRAINT_NAME": "UNIQUE_{{boName}}_NAME"
}
]
}
}
Try it myself
Drop Composite Unique Constraint Using Constraint Name Request
{
"BUS OBJ ATTR UNIQ CONSTRAINTS": {
"language": "en",
"timezone": "GMT+08:00",
"data": [
{
"CONSTRAINT_NAME": "UNIQUE_{{boName}}_UWI_START_TIME"
}
]
}
}
Try it myself
5. Responses
When response.status = 200, It will response a `application/octet-stream' excel file.
Otherwise, it will response json file, Please see Responses