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

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2022-03-29 11:37:59 +0300
committerVitor Mattos <vitor@php.rio>2022-03-29 15:31:29 +0300
commit781cf068b9d4d8161a10ae4cbd667a5e966f2d25 (patch)
tree27c50b1b23b867ca9e46a008c1ab737d18ad4317 /lib
parent07b3010c34299629989d98250d553058aaa229d2 (diff)
Change display_name size
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib')
-rw-r--r--lib/Migration/Version14000Date20220328153054.php53
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/Migration/Version14000Date20220328153054.php b/lib/Migration/Version14000Date20220328153054.php
new file mode 100644
index 000000000..a123108ba
--- /dev/null
+++ b/lib/Migration/Version14000Date20220328153054.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * @copyright Copyright (c) 2022, Vitor Mattos <vitor@php.rio>
+ *
+ * @author Vitor Mattos <vitor@php.rio>
+ *
+ * @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/>.
+ *
+ */
+
+declare(strict_types=1);
+
+namespace OCA\Talk\Migration;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version14000Date20220328153054 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 = $schemaClosure();
+
+ $table = $schema->getTable('talk_attendees');
+ $displayName = $table->getColumn('display_name');
+ if ($displayName->getLength() !== 255) {
+ $displayName->setLength(255);
+ return $schema;
+ }
+ return null;
+ }
+}