-
-
Notifications
You must be signed in to change notification settings - Fork 794
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]: Migrations are not generated for new Indexes #3873
Comments
- add relations See issue: drizzle-team/drizzle-orm#3873
I've encountered this issue in the past. (table) => [
{
embeddingIdx: index("embedding_idx").using(
"hnsw",
table.embedding.op("vector_cosine_ops")
),
},
] to: (table) => [
index("embedding_idx").using(
"hnsw",
table.embedding.op("vector_cosine_ops")
),
] I've checked this locally with the same drizzle & drizzle-kit versions you've supplied and this is the generated SQL (attached only the index part): CREATE INDEX "embedding_idx" ON "page_chunks" USING hnsw ("embedding" vector_cosine_ops);--> statement-breakpoint Hope this resolves your issue |
Thanks @AdamAkiva that worked! |
Thanks But holy crap this is so fucking stupid, hour wasted because the docs don't mention this: https://orm.drizzle.team/docs/indexes-constraints#indexes |
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.36.4
What version of
drizzle-kit
are you using?0.30.1
Other packages
No response
Describe the Bug
Creating a new issue for #3857 as the op closed that one.
The new way of describing tables properties(i.e. returning an array of object) doesn't create migrations file If the constraints are added later
This does't work
but if we use deprecated signature it works fine.
The text was updated successfully, but these errors were encountered: