summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-10-19 15:49:17 +0200
committerGitHub <noreply@github.com>2018-10-19 15:49:17 +0200
commit851f52588999421f7a1119451ddcf90637eb82b4 (patch)
tree60f2c1aec3bd1b6374a48c6d7663a9fe8967dbf6 /apps/dav/lib
parentefee380e957e3914b8a0e3fe19b5b352430c4020 (diff)
parentb83918ed6dd1516c1dbeb7a46d38372602fc15a3 (diff)
downloadnextcloud-server-851f52588999421f7a1119451ddcf90637eb82b4.tar.gz
nextcloud-server-851f52588999421f7a1119451ddcf90637eb82b4.zip
Merge pull request #11668 from nextcloud/bugfix/7726/convert_caldav_subscription_source_to_long_text
convert source column in calendarsubscription table to (long) text
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/Migration/Version1007Date20181007225117.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/apps/dav/lib/Migration/Version1007Date20181007225117.php b/apps/dav/lib/Migration/Version1007Date20181007225117.php
new file mode 100644
index 00000000000..400042f486d
--- /dev/null
+++ b/apps/dav/lib/Migration/Version1007Date20181007225117.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * @copyright Copyright (c) 2018 Georg Ehrke
+ *
+ * @author Georg Ehrke <oc.list@georgehrke.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/>.
+ *
+ */
+declare(strict_types=1);
+
+namespace OCA\DAV\Migration;
+
+use Closure;
+
+use Doctrine\DBAL\Types\Type;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\SimpleMigrationStep;
+use OCP\Migration\IOutput;
+
+class Version1007Date20181007225117 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) {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+
+ $table = $schema->getTable('calendarsubscriptions');
+ $column = $table->getColumn('source');
+
+ $column->setType(Type::getType(Type::TEXT));
+ $column->setLength(null);
+
+ return $schema;
+ }
+}