Replies: 4 comments 8 replies
-
|
Hello @quinnjr 👋 Thank you for raising this question. In Prisma Schema, you can denote fields that are generated by the database using the model YourModel {
id Int @id @default(autoincrement())
client_id UUID @db.Uuid
client_id_uuid String @db.String @default(dbgenerated("uuid_to_text(client_id)")) // This marks the field as generated by the database
}This setup ensures that Prisma understands |
Beta Was this translation helpful? Give feedback.
-
|
Hi there, To keep our discussions organized and focused on the most relevant topics, we’re reviewing and tidying up our backlog. As part of this process, we’re closing discussions that haven’t had any recent activity and appear to be outdated. If this discussion is still important to you or unresolved, we’d love to hear from you! Feel free to reopen it or start a new one with updated details. For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. Thank you for your understanding and being part of the community! |
Beta Was this translation helpful? Give feedback.
-
|
There doesn't seem to be any update on this feature. What's the state of support for generated columns in dbs that support it (PostgreSQL)? |
Beta Was this translation helpful? Give feedback.
-
|
Current workaround:
|
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Question
Hello,
I have a database that I'm importing to Prisma where I have a number of generated columns. The creation of the columns is like
The Database is Postgres so it uses the Postgres formatting for virtual fields.
uuid_to_textis already defined.Is there something I can add to the
prisma.schemafile to denote these fields are generated by the database?How to reproduce (optional)
No response
Expected behavior (optional)
No response
Information about Prisma Schema, Client Queries and Environment (optional)
No response
Beta Was this translation helpful? Give feedback.
All reactions