summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Migration
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2019-03-16 16:19:25 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-08-15 20:02:56 +0200
commit7bddcc091d5fe0f5e01325e16524d44fe8c1fb74 (patch)
tree6af37e4e745f5816292a2c496d34b12afe95440e /apps/dav/lib/Migration
parentf452e23a7db1742afa50eaa80b746afe769bdf7b (diff)
downloadnextcloud-server-7bddcc091d5fe0f5e01325e16524d44fe8c1fb74.tar.gz
nextcloud-server-7bddcc091d5fe0f5e01325e16524d44fe8c1fb74.zip
Support event reminders (email and notifications)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps/dav/lib/Migration')
-rw-r--r--apps/dav/lib/Migration/Version1007Date20181005133326.php82
1 files changed, 82 insertions, 0 deletions
diff --git a/apps/dav/lib/Migration/Version1007Date20181005133326.php b/apps/dav/lib/Migration/Version1007Date20181005133326.php
new file mode 100644
index 00000000000..1e4cce950ac
--- /dev/null
+++ b/apps/dav/lib/Migration/Version1007Date20181005133326.php
@@ -0,0 +1,82 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OCA\DAV\Migration;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\SimpleMigrationStep;
+use OCP\Migration\IOutput;
+use Doctrine\DBAL\Types\Type;
+
+/**
+ * Auto-generated migration step: Please modify to your needs!
+ */
+class Version1007Date20181005133326 extends SimpleMigrationStep {
+
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ */
+ public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
+ }
+
+ /**
+ * @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();
+
+ if (!$schema->hasTable('calendar_reminders')) {
+ $table = $schema->createTable('calendar_reminders');
+
+ $table->addColumn('id', Type::BIGINT, [
+ 'autoincrement' => true,
+ 'notnull' => true,
+ 'length' => 11,
+ 'unsigned' => true,
+ ]);
+ $table->addColumn('uid', Type::STRING, [
+ 'notnull' => true,
+ 'length' => 255,
+ ]);
+ $table->addColumn('calendarid', Type::BIGINT, [
+ 'notnull' => false,
+ 'length' => 11,
+ ]);
+ $table->addColumn('objecturi', Type::STRING, [
+ 'notnull' => true,
+ 'length' => 255,
+ ]);
+ $table->addColumn('type', Type::STRING, [
+ 'notnull' => true,
+ 'length' => 255,
+ ]);
+ $table->addColumn('notificationdate', Type::DATETIME, [
+ 'notnull' => false,
+ ]);
+ $table->addColumn('eventstartdate', Type::DATETIME, [
+ 'notnull' => false,
+ ]);
+
+ $table->setPrimaryKey(['id']);
+ $table->addIndex(['calendarid'], 'calendar_reminder_calendars');
+
+ return $schema;
+ }
+ }
+
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ */
+ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
+ }
+}