diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-05-31 02:01:42 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-05-31 02:01:42 -0100 |
commit | b13ade6938701ae7a8c38be9984651991a953109 (patch) | |
tree | 61000a2e0e7a80da5b8d311578b3d592de1a9582 | |
parent | a68c35e01f3e7fb99e6f2d77e43ce6715d694f40 (diff) |
catch duplicate
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r-- | lib/Migration/Version0002Date20190506000001.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Migration/Version0002Date20190506000001.php b/lib/Migration/Version0002Date20190506000001.php index 222d5cc5..bf32139f 100644 --- a/lib/Migration/Version0002Date20190506000001.php +++ b/lib/Migration/Version0002Date20190506000001.php @@ -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) { + } } |