-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Support ULID #13679
Copy link
Copy link
Closed
prisma/prisma-engines
#5092Labels
Milestone
Description
Problem
UUID can be suboptimal for many use-cases because:
It isn't the most character efficient way of encoding 128 bits of randomness
UUID v1/v2 is impractical in many environments, as it requires access to a unique, stable MAC address
UUID v3/v5 requires a unique seed and produces randomly distributed IDs, which can cause fragmentation in many data structures
UUID v4 provides no other information than randomness which can cause fragmentation in many data structures
From the ULID spec.
The Lexicographically sortability would especially be useful for cursor-based pagination which requires sorting by a unique, sequential column.
Suggested solution
Support ULID in the prisma schema, by defining:
@db.Ulid
Reactions are currently unavailable