MyGit

5.18.0

prisma/prisma

版本发布时间: 2024-08-07 00:07:23

prisma/prisma最新发布版本:5.19.1(2024-09-02 22:57:37)

🌟 Help us spread the word about Prisma by starring the repo or tweeting 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.

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:

Fixes and improvements

Prisma

Language tools (e.g. VS Code)

Share your feedback about Prisma ORM

We want to know how you like working with Prisma ORM in your projects! Please take our 2min survey and let us know what you like or where we can improve 🙏

Credits

Huge thanks to @mcuelenaere, @pagewang0, @Druue, @key-moon, @Jolg42, @pranayat, @ospfranco, @yubrot, @skyzh, @haaawk for helping!

相关地址:原始地址 下载(tar) 下载(zip)

查看:2024-08-07发行的版本