© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
5 replies
Ravi

How can I add a Prefix Index?

I migrated from Prisma, and I have a column with
varchar(2000)
varchar(2000)
which I indexed with
@@index([columnName(length: 191)])
@@index([columnName(length: 191)])

but the introspection schema didn't seem to recognize the index length:
columnNameIdx: index("TableName_columnName_idx").on(table.columnName)
columnNameIdx: index("TableName_columnName_idx").on(table.columnName)


is there a workaround to set the index length? maybe with raw sql?

Thank you in advance.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

add a prefix to UUID?
Drizzle TeamDTDrizzle Team / help
2y ago
Can I add a Unique constraint to a column?
Drizzle TeamDTDrizzle Team / help
3y ago
How can I create a `nulls not distinct` index in Postgres 15 for `push`?
Drizzle TeamDTDrizzle Team / help
2y ago
How can I verify a hash?
Drizzle TeamDTDrizzle Team / help
3y ago