I am using Prisma + PostgreSQL for my data. So far, I have been using ids generated by Prisma:
id String @id @default(cuid())
However, I'd like to use my own ids, something like ABCD-WXYZ, as my data will not grow so much and I'd like to have shorter ids and be able to see what the item is about using the id (e.g. PULP-FICT might represent the film Pulp Fiction, and I would easily be able to remember it this way.
How can I achieve this with Prisma + PostgreSQL?
You can manually specify id values and not have any default like this:
id String @id
In such a case, you would have to manually specify the id field when creating a new object. If you'd like to use some arbitrary database function to generate default values for the field, you can also take a look at dbgenerated().