perf(properties): Remove useless calendar-enabled rows

Instead of setting calendar-enabled to true, delete the row as true is
the default value anyway. This should make the oc_properties table a bit
smaller as calendar-enabled is the properties the most often set.

Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
This commit is contained in:
Carl Schwan 2025-08-13 11:23:49 +02:00
parent 2979a2bab0
commit e230cc8705

View file

@ -439,7 +439,7 @@ class CustomPropertiesBackend implements BackendInterface {
];
// If it was null, we need to delete the property
if (is_null($propertyValue)) {
if (is_null($propertyValue) || ($propertyName === '{http://owncloud.org/ns}calendar-enabled' && $propertyValue === '1')) {
if (array_key_exists($propertyName, $existing)) {
$deleteQuery = $deleteQuery ?? $this->createDeleteQuery();
$deleteQuery