summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-06-02 10:43:18 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-06-02 10:43:18 -0100
commitd5f8f423af4761dd09777ff4cba290a050c9683d (patch)
tree92e969b631dc926a66ec0336bc91a89de0e07284
parent73321dc5b1b301b1f5ef176a299b1665d8c135e7 (diff)
cleaning.
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r--lib/Migration/Version0002Date20190506000001.php26
1 files changed, 11 insertions, 15 deletions
diff --git a/lib/Migration/Version0002Date20190506000001.php b/lib/Migration/Version0002Date20190506000001.php
index 8d2c65a6..5dd7b237 100644
--- a/lib/Migration/Version0002Date20190506000001.php
+++ b/lib/Migration/Version0002Date20190506000001.php
@@ -32,8 +32,8 @@ namespace OCA\Social\Migration;
use Closure;
-use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use DateTime;
+use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use Doctrine\DBAL\Types\Type;
use Exception;
use OCA\Social\Db\CoreRequestBuilder;
@@ -333,23 +333,21 @@ class Version0002Date20190506000001 extends SimpleMigrationStep {
]
);
$table->addColumn(
- 'to_array', 'string',
+ 'to_array', Type::TEXT,
[
- 'notnull' => true,
- 'length' => 2000,
+ 'notnull' => true
]
);
$table->addColumn(
- 'cc', 'text',
+ 'cc', Type::TEXT,
[
'notnull' => true
]
);
$table->addColumn(
- 'bcc', 'string',
+ 'bcc', Type::TEXT,
[
- 'notnull' => true,
- 'length' => 1000,
+ 'notnull' => true
]
);
$table->addColumn(
@@ -590,15 +588,13 @@ class Version0002Date20190506000001 extends SimpleMigrationStep {
$table->addColumn(
'source', Type::TEXT,
[
- 'notnull' => true,
- 'length' => 3000,
+ 'notnull' => true
]
);
$table->addColumn(
- 'details', 'string',
+ 'details', Type::TEXT,
[
- 'notnull' => false,
- 'length' => 3000,
+ 'notnull' => false
]
);
$table->addColumn(
@@ -1230,7 +1226,7 @@ class Version0002Date20190506000001 extends SimpleMigrationStep {
&& $this->get('id', $data, '') !== '') {
$value = hash('sha512', $this->get('id', $data, ''));
}
-
+
if (in_array($field, $datetimeFields) && $value === '') {
$insert->setValue(
$field,
@@ -1242,7 +1238,7 @@ class Version0002Date20190506000001 extends SimpleMigrationStep {
);
}
}
-
+
try {
$insert->execute();
} catch (UniqueConstraintViolationException $e) {