Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into revamp-search
Browse files Browse the repository at this point in the history
  • Loading branch information
jharrell committed Jan 16, 2025
2 parents c332328 + 2eba072 commit a5c4a95
Show file tree
Hide file tree
Showing 4 changed files with 3,133 additions and 4,865 deletions.
12 changes: 6 additions & 6 deletions content/200-orm/500-reference/100-prisma-schema-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ A JSON object.
| SQL Server | [Not supported](https://github.com/prisma/prisma/issues/7417) |
| MySQL | `JSON` |
| MongoDB | [A valid `BSON` object (Relaxed mode)](https://www.mongodb.com/docs/manual/reference/mongodb-extended-json/) |
| SQLite | Not supported |
| SQLite | `JSONB` |
| CockroachDB | `JSONB` |

#### PostgreSQL
Expand Down 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 Expand Up @@ -3422,8 +3422,8 @@ An expression that can be evaluated by Prisma ORM: `42.0`, `""`, `Bob`, `now()`,

<Admonition type="warning">

**Not supported by SQLite and Microsoft SQL Server** <br />
The [SQLite connector](/orm/overview/databases/sqlite) and the The [Microsoft SQL Server connector](/orm/overview/databases/sql-server) do not support the `enum` type.
**Not supported Microsoft SQL Server** <br />
The [Microsoft SQL Server connector](/orm/overview/databases/sql-server) does not support the `enum` type.

</Admonition>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ There is _no_ official support for Node.js 16, 17, 19 and 21.

The new minimum supported TypeScript version for Prisma ORM v6 is: **5.1.0**.

:::info

This schema change only applies to PostgreSQL.
If you are using CockroachDB, you do not need to take any action—the schema for implicit m-to-n relationships remains unchanged.

:::

### Schema change for implicit m-n relations on PostgreSQL

If you're using PostgreSQL and are defining [implicit many-to-many relations](/orm/prisma-schema/data-model/relations/many-to-many-relations#implicit-many-to-many-relations) in your Prisma schema, Prisma ORM maintains the [relation table](/orm/prisma-schema/data-model/relations/many-to-many-relations#relation-tables) for you under the hood. This relation table has `A` and `B` columns to represent the tables of the models that are part of this relation.
Expand Down
Loading

0 comments on commit a5c4a95

Please sign in to comment.