diff options
author | Georg Ehrke <developer@georgehrke.com> | 2018-06-19 21:01:14 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-29 10:44:44 +0200 |
commit | 4aa4e4080c27356792b6eeab1f2f2b36ad485a05 (patch) | |
tree | 07197c21582d4e74cacce3704eaa5a67b5fb89bb /apps/dav/lib/Migration | |
parent | 3ff3141a1e4c9482ddaa68e13f545eb7e62ff9b7 (diff) | |
download | nextcloud-server-4aa4e4080c27356792b6eeab1f2f2b36ad485a05.tar.gz nextcloud-server-4aa4e4080c27356792b6eeab1f2f2b36ad485a05.zip |
Include accept / decline links in CalDAV invitation emails
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav/lib/Migration')
-rw-r--r-- | apps/dav/lib/Migration/Version1006Date20180619154313.php | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/apps/dav/lib/Migration/Version1006Date20180619154313.php b/apps/dav/lib/Migration/Version1006Date20180619154313.php new file mode 100644 index 00000000000..8fb82ffed67 --- /dev/null +++ b/apps/dav/lib/Migration/Version1006Date20180619154313.php @@ -0,0 +1,71 @@ +<?php +namespace OCA\DAV\Migration; + +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 Version1006Date20180619154313 extends SimpleMigrationStep { + + /** + * @param IOutput $output + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + * @since 13.0.0 + */ + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + if (!$schema->hasTable('calendar_invitation_tokens')) { + $table = $schema->createTable('calendar_invitation_tokens'); + + $table->addColumn('id', Type::BIGINT, [ + 'autoincrement' => true, + 'notnull' => true, + 'length' => 11, + 'unsigned' => true, + ]); + $table->addColumn('uid', Type::STRING, [ + 'notnull' => true, + 'length' => 255, + ]); + $table->addColumn('recurrenceid', Type::STRING, [ + 'notnull' => false, + 'length' => 255, + ]); + $table->addColumn('attendee', Type::STRING, [ + 'notnull' => true, + 'length' => 255, + ]); + $table->addColumn('organizer', Type::STRING, [ + 'notnull' => true, + 'length' => 255, + ]); + $table->addColumn('sequence', Type::BIGINT, [ + 'notnull' => false, + 'length' => 11, + 'unsigned' => true, + ]); + $table->addColumn('token', Type::STRING, [ + 'notnull' => true, + 'length' => 60, + ]); + $table->addColumn('expiration', Type::BIGINT, [ + 'notnull' => true, + 'length' => 11, + 'unsigned' => true, + ]); + + $table->setPrimaryKey(['id'], 'calendar_invitation_tokens_id_idx'); + $table->addIndex(['token'], 'calendar_invitation_tokens_token_idx'); + + return $schema; + } + } +} |