Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/fulltextsearch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-04-25 20:35:11 +0300
committerGitHub <noreply@github.com>2022-04-25 20:35:11 +0300
commit39e3df187474ae76bcadd8e9416a63fe62cae282 (patch)
tree8cc87c466706cf38a7ee95963900798463c65a75
parentab67fc6021dcb950262833e2eca5d8b3b6e63448 (diff)
parent090fcfe39f13d9169e4178e7621bccc2d281bf69 (diff)
Merge pull request #679 from nextcloud/fix/678/message-is-text
convert message to text
-rw-r--r--.scrutinizer.yml3
-rw-r--r--appinfo/info.xml2
-rw-r--r--lib/Migration/Version2000Date20201208130255.php3
-rw-r--r--lib/Migration/Version23001Date20220408140253.php57
4 files changed, 59 insertions, 6 deletions
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index 6375f33..2ba2eea 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -36,8 +36,6 @@ checks:
parameter_doc_comments: true
return_doc_comments: true
fix_doc_comments: true
- return_doc_comments: true
- parameter_doc_comments: true
more_specific_types_in_doc_comments: true
code_rating: true
duplication: true
@@ -56,7 +54,6 @@ checks:
parameter_non_unique: true
no_property_on_interface: true
no_non_implemented_abstract_methods: true
- deprecated_code_usage: true
closure_use_not_conflicting: true
closure_use_modifiable: true
avoid_useless_overridden_methods: true
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 9dfd692..16ae8e5 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -10,7 +10,7 @@ Core App of the full-text search framework for your Nextcloud.
]]>
</description>
- <version>23.1.0-dev</version>
+ <version>23.1.0-dev.1</version>
<licence>agpl</licence>
<author>Maxence Lange</author>
<namespace>FullTextSearch</namespace>
diff --git a/lib/Migration/Version2000Date20201208130255.php b/lib/Migration/Version2000Date20201208130255.php
index a36f9b5..01184dd 100644
--- a/lib/Migration/Version2000Date20201208130255.php
+++ b/lib/Migration/Version2000Date20201208130255.php
@@ -62,9 +62,8 @@ class Version2000Date20201208130255 extends SimpleMigrationStep {
'notnull' => true,
'length' => 1,
]);
- $table->addColumn('message', 'string', [
+ $table->addColumn('message', 'text', [
'notnull' => false,
- 'length' => 8000,
]);
$table->addColumn('indexed', 'bigint', [
'notnull' => false,
diff --git a/lib/Migration/Version23001Date20220408140253.php b/lib/Migration/Version23001Date20220408140253.php
new file mode 100644
index 0000000..ec7d6fe
--- /dev/null
+++ b/lib/Migration/Version23001Date20220408140253.php
@@ -0,0 +1,57 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>
+ *
+ * @author Joas Schilling <coding@schilljs.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\FullTextSearch\Migration;
+
+use Closure;
+use Doctrine\DBAL\Types\Type;
+use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version23001Date20220408140253 extends SimpleMigrationStep {
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ * @return null|ISchemaWrapper
+ */
+ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+
+ $table = $schema->getTable('fulltextsearch_indexes');
+ $column = $table->getColumn('message');
+
+ if ($column->getType()->getName() === Types::TEXT) {
+ return null;
+ }
+
+ $column->setType(Type::getType(Types::TEXT));
+ return $schema;
+ }
+}