add with_conflict middleware