summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-08-06 12:51:54 +0200
committerGeorg Ehrke <developer@georgehrke.com>2019-08-14 09:42:19 +0200
commit5f3d0a61eaff919a448e6513a5079856e5105058 (patch)
treeba7a8179370de9bd5f4bf295ee4600571fe1b075 /apps
parentd60bd936410c7b022dfc2b95a30c0276dc8dfdb3 (diff)
downloadnextcloud-server-5f3d0a61eaff919a448e6513a5079856e5105058.tar.gz
nextcloud-server-5f3d0a61eaff919a448e6513a5079856e5105058.zip
Add table to handle calendar delegations
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/appinfo/info.xml2
-rw-r--r--apps/dav/lib/Migration/Version1011Date20190806104428.php53
2 files changed, 54 insertions, 1 deletions
diff --git a/apps/dav/appinfo/info.xml b/apps/dav/appinfo/info.xml
index 71b3699b1ec..dc90ac58188 100644
--- a/apps/dav/appinfo/info.xml
+++ b/apps/dav/appinfo/info.xml
@@ -5,7 +5,7 @@
<name>WebDAV</name>
<summary>WebDAV endpoint</summary>
<description>WebDAV endpoint</description>
- <version>1.11.0</version>
+ <version>1.11.1</version>
<licence>agpl</licence>
<author>owncloud.org</author>
<namespace>DAV</namespace>
diff --git a/apps/dav/lib/Migration/Version1011Date20190806104428.php b/apps/dav/lib/Migration/Version1011Date20190806104428.php
new file mode 100644
index 00000000000..4c237b591ec
--- /dev/null
+++ b/apps/dav/lib/Migration/Version1011Date20190806104428.php
@@ -0,0 +1,53 @@
+<?php
+
+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;
+
+/**
+ * Auto-generated migration step: Please modify to your needs!
+ */
+class Version1011Date20190806104428 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->createTable('dav_cal_proxy');
+ $table->addColumn('id', Type::BIGINT, [
+ 'autoincrement' => true,
+ 'notnull' => true,
+ 'length' => 11,
+ 'unsigned' => true,
+ ]);
+ $table->addColumn('owner_id', Type::STRING, [
+ 'notnull' => true,
+ 'length' => 64,
+ ]);
+ $table->addColumn('proxy_id', Type::STRING, [
+ 'notnull' => true,
+ 'length' => 64,
+ ]);
+ $table->addColumn('permissions', Type::INTEGER, [
+ 'notnull' => false,
+ 'length' => 4,
+ 'unsigned' => true,
+ ]);
+
+ $table->setPrimaryKey(['id']);
+ $table->addUniqueIndex(['owner_id', 'proxy_id', 'permissions'], 'dav_cal_proxy_uidx');
+
+ return $schema;
+ }
+}