prisma/prisma (@prisma/adapter-neon)
### [`v5.18.0`](https://togithub.com/prisma/prisma/releases/tag/5.18.0)
๐ **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v5.18.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.18.0) about the release.** ๐
#### Highlights
##### Native support for UUIDv7
Previous to this release, the Prisma Schema function `uuid()` did not accept any arguments and created a UUIDv4 ID. While sufficient in many cases, UUIDv4 has a few drawbacks, namely that it is not temporally sortable.
UUIDv7 attempts to resolve this issue, making it easy to temporally sort your database rows by ID!
To support this, weโve updated the `uuid()` function in Prisma Schema to accept an optional, integer argument. Right now, the only valid values are `4` and `7`, with `4` being the default.
```tsx
model User {
id String @id @default(uuid()) // defaults to 4
name String
}
model User {
id String @id @default(uuid(4)) // same as above, but explicit
name String
}
model User {
id String @id @default(uuid(7)) // will use UUIDv7 instead of UUIDv4
name String
}
```
##### Bug squashing
Weโve squashed a number of bugs this release, special thanks to everyone who helped us! A few select highlights are:
- [SQLite db will now be created and read from the correct location when using `prismaSchemaFolder`](https://togithub.com/prisma/prisma/issues/24779).
- [Empty `Json[]` fields will now return `[]` instead of `null` when accessed through a join using the `relationJoins` Preview feature.](https://togithub.com/prisma/prisma/issues/22923)
#### Fixes and improvements
##### Prisma
- [Support UUID v7](https://togithub.com/prisma/prisma/issues/24079)
##### Language tools (e.g. VS Code)
- [Support fetching references for a model](https://togithub.com/prisma/language-tools/issues/982)
#### Credits
Huge thanks to [@mcuelenaere](https://togithub.com/mcuelenaere), [@pagewang0](https://togithub.com/pagewang0), [@Druue](https://togithub.com/Druue), [@key-moon](https://togithub.com/key-moon), [@Jolg42](https://togithub.com/Jolg42), [@pranayat](https://togithub.com/pranayat), [@ospfranco](https://togithub.com/ospfranco), [@yubrot](https://togithub.com/yubrot), [@skyzh](https://togithub.com/skyzh), [@haaawk](https://togithub.com/haaawk) for helping!
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
5.17.0
->5.18.0
5.17.0
->5.18.0
5.17.0
->5.18.0
5.17.0
->5.18.0
Release Notes
prisma/prisma (@prisma/adapter-neon)
### [`v5.18.0`](https://togithub.com/prisma/prisma/releases/tag/5.18.0) ๐ **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v5.18.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.18.0) about the release.** ๐ #### Highlights ##### Native support for UUIDv7 Previous to this release, the Prisma Schema function `uuid()` did not accept any arguments and created a UUIDv4 ID. While sufficient in many cases, UUIDv4 has a few drawbacks, namely that it is not temporally sortable. UUIDv7 attempts to resolve this issue, making it easy to temporally sort your database rows by ID! To support this, weโve updated the `uuid()` function in Prisma Schema to accept an optional, integer argument. Right now, the only valid values are `4` and `7`, with `4` being the default. ```tsx model User { id String @id @default(uuid()) // defaults to 4 name String } model User { id String @id @default(uuid(4)) // same as above, but explicit name String } model User { id String @id @default(uuid(7)) // will use UUIDv7 instead of UUIDv4 name String } ``` ##### Bug squashing Weโve squashed a number of bugs this release, special thanks to everyone who helped us! A few select highlights are: - [SQLite db will now be created and read from the correct location when using `prismaSchemaFolder`](https://togithub.com/prisma/prisma/issues/24779). - [Empty `Json[]` fields will now return `[]` instead of `null` when accessed through a join using the `relationJoins` Preview feature.](https://togithub.com/prisma/prisma/issues/22923) #### Fixes and improvements ##### Prisma - [Support UUID v7](https://togithub.com/prisma/prisma/issues/24079) ##### Language tools (e.g. VS Code) - [Support fetching references for a model](https://togithub.com/prisma/language-tools/issues/982) #### Credits Huge thanks to [@mcuelenaere](https://togithub.com/mcuelenaere), [@pagewang0](https://togithub.com/pagewang0), [@Druue](https://togithub.com/Druue), [@key-moon](https://togithub.com/key-moon), [@Jolg42](https://togithub.com/Jolg42), [@pranayat](https://togithub.com/pranayat), [@ospfranco](https://togithub.com/ospfranco), [@yubrot](https://togithub.com/yubrot), [@skyzh](https://togithub.com/skyzh), [@haaawk](https://togithub.com/haaawk) for helping!