summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Migration
diff options
context:
space:
mode:
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) {
+ }
+}