diff --git a/CHANGELOG.md b/CHANGELOG.md index a7d04254..d7cfcb06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.2.5 + +- [setup] Fixing migrations (again) + ## 0.2.4 diff --git a/Makefile b/Makefile index f643e844..46168361 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ cert_dir=$(HOME)/.nextcloud/certificates github_account=nextcloud branch=master codecov_token_dir=$(HOME)/.nextcloud/codecov_token -version+=0.2.4 +version+=0.2.5 diff --git a/appinfo/info.xml b/appinfo/info.xml index 768d4325..ab816e53 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -18,7 +18,7 @@ **🕸 Open standards:** We use the established ActivityPub standard! ]]> - 0.2.4 + 0.2.5 agpl Maxence Lange Julius Härtl diff --git a/lib/Migration/Version0002Date20190618000001.php b/lib/Migration/Version0002Date20190622000001.php similarity index 95% rename from lib/Migration/Version0002Date20190618000001.php rename to 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':