-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: add default reminder setting caldav #58679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,6 +84,7 @@ class CustomPropertiesBackend implements BackendInterface { | |
| private const ALLOWED_NC_PROPERTIES = [ | ||
| '{http://owncloud.org/ns}calendar-enabled', | ||
| '{http://owncloud.org/ns}enabled', | ||
| '{http://owncloud.org/ns}default-alarm', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should only be required if you need to save the settings in the oc_properties table, since you are doing a custom mapping to the oc_calendars table, pretty sure this is not needed |
||
| ]; | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * SPDX-FileCopyrightText: 2026 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\Attributes\AddColumn; | ||
| use OCP\Migration\Attributes\ColumnType; | ||
| use OCP\Migration\IOutput; | ||
| use OCP\Migration\SimpleMigrationStep; | ||
|
|
||
| #[AddColumn(table: 'calendars', name: 'default_alarm', type: ColumnType::STRING)] | ||
| class Version1037Date20260302000000 extends SimpleMigrationStep { | ||
| public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { | ||
| /** @var ISchemaWrapper $schema */ | ||
| $schema = $schemaClosure(); | ||
|
|
||
| $calendarsTable = $schema->getTable('calendars'); | ||
|
|
||
| if (!$calendarsTable->hasColumn('default_alarm')) { | ||
| $calendarsTable->addColumn('default_alarm', Types::STRING, [ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to you tests bellow the setting is an integer there for the field should be an integer also, make sure its a SINGED int, so that both positive and negative numbers work. Also I would allow null, so that null means not set, a positive int means alarm after the start and a negative means before the start |
||
| 'notnull' => false, | ||
| 'length' => 10, | ||
| 'default' => null, | ||
| ]); | ||
| } | ||
|
|
||
| return $schema; | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need the NS_OWNCLOUD