Skip to content

Commit

Permalink
Merge branch 'main' into DA-2265
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur-arch authored Jan 14, 2025
2 parents 0e8c903 + 3ed8f09 commit 0493ea8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/200-orm/500-reference/100-prisma-schema-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2200,12 +2200,12 @@ Defines a compound [unique constraint](/orm/prisma-schema/data-model/models#defi
#### Arguments

| Name | Required | Type | Description |
| ----------- | -------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
| ----------- | -------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fields` | **Yes** | `FieldReference[]` | A list of field names - for example, `["firstname", "lastname"]`. Fields must be mandatory - see remarks. |
| `name` | **No** | `String` | The name of the unique combination of fields - defaults to `fieldName1_fieldName2_fieldName3` |
| `map` | **No** | `String` |
| `map` | **No** | `String` | |
| `length` | **No** | `number` | Allows you to specify a maximum length for the subpart of the value to be indexed.<br /><br />MySQL only. In preview in versions 3.5.0 and later, and in general availability in versions 4.0.0 and later. |
| `sort` | **No** | `String` | Allows you to specify in what order the entries of the constraint are stored in the database. The available options are `Asc` and `Desc`.<br /><br />In preview in versions 3.5.0 and later, and in general availability in versions 4.0.0 and later. | |
| `sort` | **No** | `String` | Allows you to specify in what order the entries of the constraint are stored in the database. The available options are `Asc` and `Desc`.<br /><br />In preview in versions 3.5.0 and later, and in general availability in versions 4.0.0 and later. |
| `clustered` | **No** | `Boolean` | Defines whether the constraint is clustered or non-clustered. Defaults to `false`.<br /><br />SQL Server only. In preview in versions 3.13.0 and later, and in general availability in versions 4.0.0 and later. |

The name of the `fields` argument on the `@@unique` attribute can be omitted:
Expand Down

0 comments on commit 0493ea8

Please sign in to comment.