Prisma Accelerate’s Ghost Cache: Refusing to Drop UUID+Email for Int+Username

I’m wrestling with a stubborn spirit in the pool that won’t let go of my old schema. Here’s the saga: Environment DB: Neon PostgreSQL (pooled URL, sslmode=require) Runtime: Cloudflare Workers Prisma: @prisma/client 6.12.0 @prisma/extension-accelerate 2.0.2 1. Original Schema (worked fine) prisma Copy code model User { id String @id @default(uuid()) email String @unique // …other fields } 2. New Schema (should just work… right?) prisma Copy code model User { id Int @id @default(autoincrement()) username String @unique // …other fields } 3. The Haunting Error perl Copy code PrismaClientUnknownRequestError PostgresError 22P03: incorrect binary data format in bind parameter 1 Triggers on my lone prisma.user.create({ data: { username, // } }). 4. Exorcism Attempts Dropped & re‑created tables in same Neon project Spun up a brand‑new Neon project + fresh Accelerate key Re‑ran migrations, then npx prisma generate --accelerate each time Restarted VSCode, Windows, Cloudflare Worker… multiple incantations Temporary ward: appending ?pgbouncer=true&statement_cache_size=0 to DB URL forces it to behave Yet, every fresh repo still channels the old UUID+email plan. Neon’s columns reflect the new Int + username schema, but Prisma’s cache refuses to sync. 5. My Theory Prisma Accelerate is holding onto a prepared‑statement plan baked for the UUID binding. After migration, it keeps reusing that plan but tries to bind an Int, and Postgres slaps it down with 22P03. Curse of cache invalidation strikes again.
3 Replies
Prisma AI Help
Prisma AI Help5mo ago
You selected to wait for the human sages. They'll share their wisdom soon. Grab some tea while you wait, or check out #ask-ai if you'd like a quick chat with the bot anyway!
Nurul
Nurul5mo ago
Hey 👋 Did you try to invalidate all cache and see if the issue still persists? https://www.prisma.io/docs/postgres/database/api-reference/caching-api#accelerateinvalidateall
Prisma Postgres: Cache API Reference | Prisma Documentation
Cache API reference documentation for Prisma Postgres.
cheating lemon
cheating lemonOP5mo ago
Hey Nurul, I've tried it and it didnt work Another issue I've faced is in a different project i was not using accelerate but it kept giving me an error about the connection string not be a accelerate link. Even after deleting the prisma projects in my account, it gave the same erro. Can you tell me how to deep purge Prisma from my device so that i can redo everything from scratch cause I've tried a lot and nothing works Also having fed up with all the issues, I moved my project to google firebase studio and ran it on the web and its WORKING. This proves that my code isn't the issue.

Did you find this page helpful?