lucia icon indicating copy to clipboard operation
lucia copied to clipboard

Prisma adapter: Foreign key constraint ignored for Refresh_Tokens.user_id when using PlanetScale

Open pilcrowonpaper opened this issue 2 years ago • 1 comments

No errors are thrown when Lucia attempts to create a new row for Refresh_Token using a user_id of a user that does not exist when using it with PlanetScale. Not sure if this is a problem with PlanetScale, Prisma, or the code.

pilcrowonpaper avatar Jul 26 '22 12:07 pilcrowonpaper

Likely a problem with Prisma's referential integrity emulation

  • https://www.prisma.io/docs/guides/database/using-prisma-with-planetscale
  • https://www.prisma.io/docs/concepts/components/prisma-schema/relations/referential-integrity

pilcrowonpaper avatar Jul 26 '22 13:07 pilcrowonpaper

I have no idea how to fix this and isn't an issue with Lucia, so I'll close this for now

pilcrowonpaper avatar Nov 11 '22 14:11 pilcrowonpaper