How to fix ERROR: foreign key constraint violation in PostgreSQL | DevErrors