How can I create a GIN index for a sub-property of...
# orm-help
a
How can I create a GIN index for a sub-property of a JSON column?
Copy code
CREATE INDEX ON table_name((column_name->>'json_prop')) USING GIN (column_name);
--                                      ^ looking for this behavior
a
Hey Zain 👋, This is not possible yet through the Prisma Schema, but you could edit your generated migration files to accomplish this.
npx prisma generate --create-only
and then edit the generated
.sql
file. This sounds like a cool feature request, though, would you mind filling one out?
a
Thanks Austin, will do 👍