use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Exception\ConstraintViolationException;
+use Doctrine\DBAL\Exception\NotNullConstraintViolationException;
use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Schema\Schema;
use OC\DB\QueryBuilder\QueryBuilder;
}, array_merge($keys, $values))
);
return $insertQb->execute();
+ } catch (NotNullConstraintViolationException $e) {
+ throw $e;
} catch (ConstraintViolationException $e) {
// value already exists, try update
$updateQb = $this->getQueryBuilder();