The "primaryKeyFields" property is an optional array of strings that specifies the fields of the table’s primary key when multiple fields are combined to form the primary key.
Note The best practice is not to use the
"primaryKeyFields"or"primaryKey"properties, so the"createTable"action will automatically create a primary key field named"id"with a unique index named"id_pk".
The order of fields in this property is the order of fields in the primary key index. The "fields" property contains the name and type of each field that is specified in the "primaryKeyFields" array.
A primary key with multiple fields has an index named "pk". If you specify just one field, the index is named "<fieldname>_pk".
If only one field is used as the primary key, the "primaryKey" property defines the primary key.
Note The
"primaryKeyFields"and"primaryKey"properties cannot be used together.
Example
"primaryKeyFields": [
"a",
"b",
"c"
],
"fields": [
{
"name": "a",
"type": "tinyint"
},
{
"name": "b",
"type": "smallint"
},
{
"name": "c",
"type": "integer"
}
]