summaryrefslogtreecommitdiffstats
path: root/lib/Migration
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Migration')
-rw-r--r--lib/Migration/Version0002Date20190506000001.php8
-rw-r--r--lib/Migration/Version0002Date20190618000001.php18
2 files changed, 16 insertions, 10 deletions
diff --git a/lib/Migration/Version0002Date20190506000001.php b/lib/Migration/Version0002Date20190506000001.php
index bfee1a1a..975d111b 100644
--- a/lib/Migration/Version0002Date20190506000001.php
+++ b/lib/Migration/Version0002Date20190506000001.php
@@ -43,6 +43,14 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
+// notes on migration for A3:
+//
+// 'details' in _stream
+// 'hidden_on_timeline' in _stream should be replaced by '
+//filter_duplicate'
+//
+//
+
/**
* Class Version0002Date20190226000001
*
diff --git a/lib/Migration/Version0002Date20190618000001.php b/lib/Migration/Version0002Date20190618000001.php
index 10dcadd9..a534bf18 100644
--- a/lib/Migration/Version0002Date20190618000001.php
+++ b/lib/Migration/Version0002Date20190618000001.php
@@ -32,14 +32,10 @@ namespace OCA\Social\Migration;
use Closure;
-use DateTime;
-use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use Doctrine\DBAL\Schema\SchemaException;
use Doctrine\DBAL\Types\Type;
use Exception;
-use OCA\Social\Exceptions\CacheActorDoesNotExistException;
use OCP\DB\ISchemaWrapper;
-use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
@@ -82,12 +78,14 @@ class Version0002Date20190618000001 extends SimpleMigrationStep {
}
$table = $schema->getTable('social_a2_stream');
- $table->addColumn(
- 'details', Type::TEXT,
- [
- 'notnull' => false
- ]
- );
+ if (!$table->hasColumn('details')) {
+ $table->addColumn(
+ 'details', Type::TEXT,
+ [
+ 'notnull' => false
+ ]
+ );
+ }
return $schema;
}