Updated database ON CONFLICT clause for new scheme