Violation of primary key constraint. Foreign key postgresql.