nanoid prisma schema /w planetscale
Hey gang, does anyone know how I can define a nanoid field with prisma if I am using planetscale?
From the
create-t3-stack
example:
Now let's say I want to generate a shareable URL that points to the user's profile, so I want to save an extra field on this schema similar to the id
field, but with nanoid.
Is there any workaround until nanoid is officially supported by Prisma?
https://github.com/prisma/prisma/issues/17199
I would like to avoid transformations in the app layer if possible. Thanks!GitHub
Finish the implementation of
@default(nanoid())
· Issue #17199 · ...See prisma/prisma-engines#3556 for context. The missing piece we identified engines-side is migrate support (diffing, special handling of prisma-level defaults re: warnings). Maybe language tools, ...
0 Replies