Generate TEXT fields from String
Problem
Hi, I’m using `prisma2 lift` to generate my database, but it’s generating all my String fields as `VARCHAR` with size 191. Unfortunately, when I go to populate these fields, some of my data has more than 191 characters. Is there a way I can get `prisma2 lift` to generate `TEXT` fields or specify my desired length of `VARCHAR`? Thanks!
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Generate TEXT fields from String
Thanks for the responses @mavilein and @matthewmueller! Maybe a better solution doesn't involve handling this implicitly, but rather requires the user to explicitly specify that they want to use a `TEXT` type. The syntax would therefore be something like: [code block] You could prevent any annotations of `@unique` or `@id` from being applied to fields with that annotation. Seems related to https
Trust Score
5 verifications
- 1
Thanks for the responses @mavilein and @matthewmueller!
Thanks for the responses @mavilein and @matthewmueller!
- 2
Maybe a better solution doesn't involve handling this implicitly, but rather req
[code block] You could prevent any annotations of `@unique` or `@id` from being applied to fields with that annotation.
- 3
Seems related to https://github.com/prisma/prisma2/issues/335 as well
Seems related to https://github.com/prisma/prisma2/issues/335 as well
- 4
For us, this is a very basic/important usecase, so any help you can provide woul
For us, this is a very basic/important usecase, so any help you can provide would be greatly appreciated!
Validation
Resolved in prisma/prisma GitHub issue #4713. Community reactions: 8 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep