You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after migrating to v0.31 it tries to recreate the indexes I have (pg)
The generated migration
DROPINDEX IF EXISTS "orgIdIndex";--> statement-breakpointDROPINDEX IF EXISTS "cardTypeIdIndex";--> statement-breakpointDROPINDEX IF EXISTS "nameIndex";--> statement-breakpointCREATEINDEXIF NOT EXISTS "orgIdIndex"ON"Cards" USING btree (orgId);--> statement-breakpointCREATEINDEXIF NOT EXISTS "cardTypeIdIndex"ON"Cards" USING btree (cardTypeId);--> statement-breakpointCREATEINDEXIF NOT EXISTS "nameIndex"ON"Cards" USING btree (name);
Error
CREATE INDEX IF NOT EXISTS "orgIdIndex" ON "Cards" USING btree (orgId);
🛢 rollback
🛢 DB - Database migration failed error: column "orgid" does not exist
at /node_modules/pg/lib/client.js:526:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /.next/server/chunks/node_modules_drizzle-orm_9f263b._.js:4065:25
at async NodePgSession.transaction (/.next/server/chunks/node_modules_drizzle-orm_9f263b._.js:5900:28)
at async PgDialect.migrate (/.next/server/chunks/node_modules_drizzle-orm_9f263b._.js:4061:9)
at async migrate (/.next/server/chunks/node_modules_drizzle-orm_9f263b._.js:69:5)
at async migrateDb (/.next/server/chunks/_0508b7._.js:1474:9)
at async POST (/.next/server/chunks/_0508b7._.js:1516:9)
at async /node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:53446
my guess is that the query executes with lowercase, and my column is mixed. (orgId !== orgid)
Expected behavior
i would expect the recreation of the index to succeed
Environment & setup
mac + next js 14+ pg + drizzle
The text was updated successfully, but these errors were encountered:
AlonMiz
changed the title
[BUG]: Recreating pg index in version 0.31 fails
[BUG]: Recreating pg index in version 0.31(orm) + 0.22(kit) fails
Jun 7, 2024
What version of
drizzle-orm
are you using?0.31.1
What version of
drizzle-kit
are you using?0.22.4
Describe the Bug
after migrating to v0.31 it tries to recreate the indexes I have (pg)
The generated migration
Error
my guess is that the query executes with lowercase, and my column is mixed. (
orgId
!==orgid
)Expected behavior
i would expect the recreation of the index to succeed
Environment & setup
mac + next js 14+ pg + drizzle
The text was updated successfully, but these errors were encountered: