ConnectorError after moving to Prisma Postgres
I am in the process of migrating from a Neon postgres db to a Prisma Postgres db. I followed the migration docs to transfer my data and table structure: https://www.prisma.io/docs/getting-started/prisma-postgres/import-from-existing-database-postgresql
After doing this, I am able to load all data, but any delete or update is failing with this error:
Here is the schema I am using: https://github.com/tylerpashigian/t3-recipe-book/blob/main/prisma/schema.prisma
Does anyone know why I'm getting this error and how I can fix it? Everything I am seeing points to my schema not being set up propely (likely a table missing an
@id
?), but I'm curious how this worked fine on my previous db.7 Replies
You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the
#ask-ai
channel awaits if you're curious!Hey @tyler4949 👋
Is this delete and update failing only for a specific table or for all tables?
Example: If you update a user model do you still get this error?
Hi @Nurul! Thank you for the response. It looks like I am able to delete a User just fine. When I try to delete the recipe is the issue though. I also get the recipe delete error in Prisma Studio. Let me know if you need any other info!
Can you please update to latest prisma version (6.3.0) and check if you still get the same issue?
I see you are on version 5.20.0. This bug was fixed in version 6.0.0:
https://github.com/prisma/prisma/issues/25196
GitHub
Prisma join tables unable to be replicated by default · Issue #2519...
Bug description (Creating an issue from my comment on this closed issue.) Due to Prisma relation tables not having a primary key and due to the default replica identity behaviour these tables are n...
@Nurul I did update to
6.3.0
as part of the Prisma Postgres setup steps. I ran the following command: npm install prisma @prisma/client@latest @prisma/extension-accelerate
. Sorry, these changes are on my local, I havent pushed these up yet. I just wanted to share my prisma schema with you as a reference because that hasnt changed
I am still getting the same issue with that thoughCan you do a migration as mentioned here and check if you still get the error after the migration?
https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-6#schema-change-for-implicit-m-n-relations-on-postgresql
Upgrade to Prisma ORM 6 | Prisma Documentation
Guides on how to upgrade to Prisma ORM 6
Ah I didnt see this as part of the setup docs, thank you. I will try that
@Nurul (Prisma) looks like that did the trick, thank you so much!