after migrating to v0.31 it tries to recreate the indexes I have (pg)
The generated migration
DROP INDEX IF EXISTS "orgIdIndex";--> statement-breakpoint
DROP INDEX IF EXISTS "cardTypeIdIndex";--> statement-breakpoint
DROP INDEX IF EXISTS "nameIndex";--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "orgIdIndex" ON "Cards" USING btree (orgId);--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "cardTypeIdIndex" ON "Cards" USING btree (cardTypeId);--> statement-breakpoint
CREATE INDEX IF 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
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