diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2025-06-05 20:38:15 +0200 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2025-06-05 20:38:15 +0200 |
commit | 416d68dc988c086419e6ef41bab8f3e68e0a187b (patch) | |
tree | 2c5950cf54609692f0807d0b57515c52e02dd3bc | |
parent | cdd09b9ba6948bfb28b95acb14222372e92efeed (diff) | |
download | nextcloud-server-feat/federated-calendar-sharing.tar.gz nextcloud-server-feat/federated-calendar-sharing.zip |
fixup! feat: calendar federationfeat/federated-calendar-sharing
-rw-r--r-- | apps/dav/appinfo/info.xml | 2 | ||||
-rw-r--r-- | apps/dav/composer/composer/autoload_classmap.php | 1 | ||||
-rw-r--r-- | apps/dav/composer/composer/autoload_static.php | 1 | ||||
-rw-r--r-- | apps/dav/lib/Migration/Version1034Date20250605132605.php | 92 |
4 files changed, 95 insertions, 1 deletions
diff --git a/apps/dav/appinfo/info.xml b/apps/dav/appinfo/info.xml index 2b3a9fcede8..4595b0cffe9 100644 --- a/apps/dav/appinfo/info.xml +++ b/apps/dav/appinfo/info.xml @@ -10,7 +10,7 @@ <name>WebDAV</name> <summary>WebDAV endpoint</summary> <description>WebDAV endpoint</description> - <version>1.34.0</version> + <version>1.34.1</version> <licence>agpl</licence> <author>owncloud.org</author> <namespace>DAV</namespace> diff --git a/apps/dav/composer/composer/autoload_classmap.php b/apps/dav/composer/composer/autoload_classmap.php index 3f5c4ee06d4..05509001957 100644 --- a/apps/dav/composer/composer/autoload_classmap.php +++ b/apps/dav/composer/composer/autoload_classmap.php @@ -367,6 +367,7 @@ return array( 'OCA\\DAV\\Migration\\Version1029Date20231004091403' => $baseDir . '/../lib/Migration/Version1029Date20231004091403.php', 'OCA\\DAV\\Migration\\Version1030Date20240205103243' => $baseDir . '/../lib/Migration/Version1030Date20240205103243.php', 'OCA\\DAV\\Migration\\Version1031Date20240610134258' => $baseDir . '/../lib/Migration/Version1031Date20240610134258.php', + 'OCA\\DAV\\Migration\\Version1034Date20250605132605' => $baseDir . '/../lib/Migration/Version1034Date20250605132605.php', 'OCA\\DAV\\Paginate\\LimitedCopyIterator' => $baseDir . '/../lib/Paginate/LimitedCopyIterator.php', 'OCA\\DAV\\Paginate\\PaginateCache' => $baseDir . '/../lib/Paginate/PaginateCache.php', 'OCA\\DAV\\Paginate\\PaginatePlugin' => $baseDir . '/../lib/Paginate/PaginatePlugin.php', diff --git a/apps/dav/composer/composer/autoload_static.php b/apps/dav/composer/composer/autoload_static.php index 002b6fe8489..875f785b9b9 100644 --- a/apps/dav/composer/composer/autoload_static.php +++ b/apps/dav/composer/composer/autoload_static.php @@ -382,6 +382,7 @@ class ComposerStaticInitDAV 'OCA\\DAV\\Migration\\Version1029Date20231004091403' => __DIR__ . '/..' . '/../lib/Migration/Version1029Date20231004091403.php', 'OCA\\DAV\\Migration\\Version1030Date20240205103243' => __DIR__ . '/..' . '/../lib/Migration/Version1030Date20240205103243.php', 'OCA\\DAV\\Migration\\Version1031Date20240610134258' => __DIR__ . '/..' . '/../lib/Migration/Version1031Date20240610134258.php', + 'OCA\\DAV\\Migration\\Version1034Date20250605132605' => __DIR__ . '/..' . '/../lib/Migration/Version1034Date20250605132605.php', 'OCA\\DAV\\Paginate\\LimitedCopyIterator' => __DIR__ . '/..' . '/../lib/Paginate/LimitedCopyIterator.php', 'OCA\\DAV\\Paginate\\PaginateCache' => __DIR__ . '/..' . '/../lib/Paginate/PaginateCache.php', 'OCA\\DAV\\Paginate\\PaginatePlugin' => __DIR__ . '/..' . '/../lib/Paginate/PaginatePlugin.php', diff --git a/apps/dav/lib/Migration/Version1034Date20250605132605.php b/apps/dav/lib/Migration/Version1034Date20250605132605.php new file mode 100644 index 00000000000..3267ea80be0 --- /dev/null +++ b/apps/dav/lib/Migration/Version1034Date20250605132605.php @@ -0,0 +1,92 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCA\DAV\Migration; + +use Closure; +use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +class Version1034Date20250605132605 extends SimpleMigrationStep { + /** + * @param IOutput $output + * @param Closure(): ISchemaWrapper $schemaClosure + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + $davSharesTable = $schema->getTable('dav_shares'); + if (!$davSharesTable->hasColumn('token')) { + $davSharesTable->addColumn('token', Types::STRING, [ + 'notnull' => false, + 'default' => null, + 'length' => 255, + ]); + } + + if (!$schema->hasTable('calendars_federated')) { + $federatedCalendarsTable = $schema->createTable('calendars_federated'); + $federatedCalendarsTable->addColumn('id', Types::BIGINT, [ + 'autoincrement' => true, + 'notnull' => true, + 'unsigned' => true, + ]); + $federatedCalendarsTable->addColumn('display_name', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + ]); + $federatedCalendarsTable->addColumn('color', Types::STRING, [ + 'notnull' => true, + 'length' => 7, + ]); + $federatedCalendarsTable->addColumn('uri', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + ]); + $federatedCalendarsTable->addColumn('principaluri', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + ]); + $federatedCalendarsTable->addColumn('remote_Url', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + ]); + $federatedCalendarsTable->addColumn('token', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + ]); + $federatedCalendarsTable->addColumn('sync_token', Types::INTEGER, [ + 'notnull' => true, + 'unsigned' => true, + 'default' => 0, + ]); + $federatedCalendarsTable->addColumn('last_sync', Types::BIGINT, [ + 'notnull' => false, + 'unsigned' => true, + 'default' => null, + ]); + $federatedCalendarsTable->addColumn('shared_by', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + ]); + $federatedCalendarsTable->addColumn('shared_by_display_name', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + ]); + $federatedCalendarsTable->setPrimaryKey(['id']); + } + + return $schema; + } +} |