-
-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: drizzle-zod's createInsertSchema() can't handle column of type vector
#2424
Comments
Experiencing the same error after updating to latest drizzle-orm 0.31.0. The problems seems to be that the |
Same here. Followed this official guide (https://orm.drizzle.team/learn/guides/vector-similarity-search) and using |
Can also confirm that I have the same issue 🤔 is there any quick fix around this except remove the column? |
I experienced as well. As a temporary solution, I defined the zod schema manually for just my embedding table. I have the content in one table, then when a new row gets added, it is broken into chunks and each chunk is saved in another table (embeddings) that has a FK to the id of the content. |
FYI for those who are blocked because of this, I was able to avoid this issue by creating a new embeddings table and joining them onto my profiles. Which is probably a better way for our project in the long run. |
I think this may be happening with the |
Facing the same issue with both selectSchema and insertSchema with vector types specifically. |
I can confirm the same problem with |
Also facing this issue with vector columns when using |
I can also confirm that it is still happening with point type from drizzle's pg-core |
This is still happening for
|
for now you can't co-locate the zod schemas in any files that export schemas. you will have to have the schemas in a separate file for now |
hi! any updates here? its still happen on |
I can confirm it happens for me as well on the latest drizzle zod version |
Downgrading to
|
What version of
drizzle-orm
are you using?0.31.0
What version of
drizzle-kit
are you using?0.22.1
Describe the Bug
One of my columns is of type
vector
(from thepgvector
extension). I usecreateInsertSchema()
from thedrizzle-zod
package to create a Zod schema for that table. When navigating to the page where that Zod schema is used, I'm getting the following error:Error Cannot use 'in' operator to search for 'enumValues' in undefined
When I remove the
vector
column, everything works fine. I'm not really sure why the error talks aboutenumValues
at all..but I figured it must have something to do with thevector
column.schema:
Expected behavior
Error should not happen.
Environment & setup
I'm using "drizzle-zod": "^0.5.1"
Full Error stack:
The text was updated successfully, but these errors were encountered: