Create clustered PK


#1

I’m trying to create a table with multiple primary keys, with the CreateTables() in the API Docs. Is there any way to do so?

The request with this JSON (Both fields with is_primary_key = true) :
{
“table”: [
{
“name”: “Alarm”,
“label”: “Alarm”,
“plural”: “Alarm”,
“field”: [
{
“name”: “RowId”,
“label”: “RowId”,
“type”: “”,
“db_type”: “bigint”,
“is_primary_key”: true,
“is_foreign_key”: false,
“ref_table”: “”,
“ref_fields”: “”
},
{
“name”: “Oid”,
“label”: “Oid”,
“type”: “”,
“db_type”: “bigint”,
“is_primary_key”: true,
“is_foreign_key”: false,
“ref_table”: “”,
“ref_fields”: “”
}
]
}
]
}

ends up with the response:

“error”: [
{
“error_detail”: {
“SQLSTATE”: “HY000”,
“driver_name”: “mysql”,
“driver_error_code”: 1750,
“driver_error_message”: “General SQL Server error: Check messages from the SQL Server [1750] (severity 16) [(null)]”
},
“message”: “CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1750 General SQL Server error: Check messages from the SQL Server [1750] (severity 16) [(null)]”,
“code”: 500
}
]

Only one PK on the table works fine.


#2

Is this MySQL? When you go to the server to check what the error is, what is the error message the server provides you?