Join Nostr
2024-10-25 13:50:59 UTC
in reply to

Dave Mason on Nostr: Afterwards, the developer ran into Foreign Key constraint violations when attempting ...

Afterwards, the developer ran into Foreign Key constraint violations when attempting to insert to the original table. Their 'solution' was to drop the Foreign Key constraint.

I helped them to understand that the FK violations were working as designed--they needed to populate values in the lookup table first (or verify they already exist) before attempting to insert to the dependent table. They added the FK constraint back, made adjustments to their code, and overcame the FK violations.

3/X