diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-06-21 23:43:44 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-06-21 23:43:44 -0100 |
commit | e6842a5b6ce41bdfadc07d521be52d0faff63534 (patch) | |
tree | c11ff3e77e096daa37e385a48f0c933236b09121 /lib | |
parent | 40d24adbac9a3365963502ead64c6a43ce55fa9e (diff) |
0.2.5
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Migration/Version0002Date20190622000001.php (renamed from lib/Migration/Version0002Date20190618000001.php) | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/Migration/Version0002Date20190618000001.php b/lib/Migration/Version0002Date20190622000001.php index a534bf18..a713215c 100644 --- a/lib/Migration/Version0002Date20190618000001.php +++ b/lib/Migration/Version0002Date20190622000001.php @@ -46,7 +46,7 @@ use OCP\Migration\SimpleMigrationStep; * * @package OCA\Social\Migration */ -class Version0002Date20190618000001 extends SimpleMigrationStep { +class Version0002Date20190622000001 extends SimpleMigrationStep { /** @var IDBConnection */ @@ -87,6 +87,13 @@ class Version0002Date20190618000001 extends SimpleMigrationStep { ); } + $qb = $this->connection->getQueryBuilder(); + $qb->delete('social_a2_stream'); + $expr = $qb->expr(); + $qb->where($expr->eq('type', $qb->createNamedParameter('Announce'))); + + $qb->execute(); + return $schema; } @@ -359,6 +366,10 @@ class Version0002Date20190618000001 extends SimpleMigrationStep { return; } + if ($oldValue === '') { + $oldValue = null; + } + $update = $this->connection->getQueryBuilder(); $update->update($dest); $update->set($field, $update->createNamedParameter($oldValue)); @@ -366,7 +377,10 @@ class Version0002Date20190618000001 extends SimpleMigrationStep { $update->where($expr->eq($prim, $update->createNamedParameter($oldId))); - $update->execute(); + try { + $update->execute(); + } catch (Exception $e) { + } break; case 'boolean': |