Ravi
Explore posts from serversDTDrizzle Team
•Created by Ravi on 7/13/2023 in #help
How can I add a Prefix Index?
I migrated from Prisma, and I have a column with
varchar(2000)
which I indexed with @@index([columnName(length: 191)])
but the introspection schema didn't seem to recognize the index length:
is there a workaround to set the index length? maybe with raw sql?
Thank you in advance.6 replies
DTDrizzle Team
•Created by Ravi on 7/12/2023 in #help
Custom column type with default not working?
I tried to add a new column with a custom type and a default value.
but for some reason when I tried to
db push
, it warned me that it didn't have a default value and that it would truncate the tables.
Am I doing something wrong?
4 replies
DTDrizzle Team
•Created by Ravi on 7/11/2023 in #help
good way to get the "count" for paginated queries
I'm doing the following to get the total count and the values in a paginated query:
I wonder if there is a better way to do it.
I'll add more things in the
where
to make a filter functionality and It would be great if I didn't have to add it in both places separately. Is there a way to do it (and still keep the type safety)?
thank you in advance!3 replies