lucia
lucia copied to clipboard
Prisma adapter: Foreign key constraint ignored for Refresh_Tokens.user_id when using PlanetScale
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.
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
I have no idea how to fix this and isn't an issue with Lucia, so I'll close this for now