How to fix ERROR: insert or update on table violates foreign key constraint in PostgreSQL | DevErrors