Revert "Revert "Added if_not_exists as an option""

Pull in `if_not_exists` code to the new `2.0` branch