catch duplicate

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/553/head
Maxence Lange 2019-05-31 02:01:42 -01:00
rodzic a68c35e01f
commit b13ade6938
1 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -32,6 +32,7 @@ namespace OCA\Social\Migration;
use Closure;
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use DateTime;
use Doctrine\DBAL\Types\Type;
use Exception;
@ -1218,8 +1219,11 @@ class Version0002Date20190506000001 extends SimpleMigrationStep {
);
}
}
$insert->execute();
try {
$insert->execute();
} catch (UniqueConstraintViolationException $e) {
}
}