What version of drizzle-orm are you using?
1.0.0-beta.17-67b1795
What version of drizzle-kit are you using?
1.0.0-beta.17-67b1795
Describe the Bug
When running drizzle-kit pull against a PostgreSQL database that has ivfflat indexes (from pgvector), the generated migration SQL uses the access method name (ivfflat) in the operator class position instead of the actual operator class (e.g. vector_cosine_ops).
Production index (from pg_indexes):
CREATE INDEX idx_claims_embedding ON claims USING ivfflat (claim_embedding vector_cosine_ops)
What drizzle-kit pull generates:
index("idx_claims_embedding").using("ivfflat", table.claimEmbedding.asc().nullsLast().op("ivfflat"))
CREATE INDEX "idx_claims_embedding" ON "claims" USING ivfflat ("claim_embedding" ivfflat);
Expected output:
index("idx_claims_embedding").using("ivfflat", table.claimEmbedding.asc().nullsLast().op("vector_cosine_ops"))
CREATE INDEX "idx_claims_embedding" ON "claims" USING ivfflat ("claim_embedding" vector_cosine_ops);
This affects all ivfflat indexes regardless of which operator class they use. The generated SQL fails when applied because ivfflat is not a valid operator class — it's the index access method.
Expected behavior
drizzle-kit pull should output the actual operator class from pg_opclass (e.g. vector_cosine_ops, vector_l2_ops, vector_ip_ops) instead of the access method name.
Environment & setup
- PostgreSQL 17 (Neon)
- pgvector extension installed
- 8 ivfflat indexes, all using
vector_cosine_ops — all pulled incorrectly
What version of
drizzle-ormare you using?1.0.0-beta.17-67b1795
What version of
drizzle-kitare you using?1.0.0-beta.17-67b1795
Describe the Bug
When running
drizzle-kit pullagainst a PostgreSQL database that has ivfflat indexes (from pgvector), the generated migration SQL uses the access method name (ivfflat) in the operator class position instead of the actual operator class (e.g.vector_cosine_ops).Production index (from
pg_indexes):What
drizzle-kit pullgenerates:Expected output:
This affects all ivfflat indexes regardless of which operator class they use. The generated SQL fails when applied because
ivfflatis not a valid operator class — it's the index access method.Expected behavior
drizzle-kit pullshould output the actual operator class frompg_opclass(e.g.vector_cosine_ops,vector_l2_ops,vector_ip_ops) instead of the access method name.Environment & setup
vector_cosine_ops— all pulled incorrectly