Skip to content

Commit aa2bfe9

Browse files
committed
Add more properties names to clean
Signed-off-by: Thomas Citharel <[email protected]>
1 parent 139ef4f commit aa2bfe9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/dav/lib/Migration/RemoveObjectProperties.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@
2121
*/
2222
namespace OCA\DAV\Migration;
2323

24+
use OCP\DB\QueryBuilder\IQueryBuilder;
2425
use OCP\IDBConnection;
2526
use OCP\Migration\IOutput;
2627
use OCP\Migration\IRepairStep;
2728

2829
class RemoveObjectProperties implements IRepairStep {
2930
private const RESOURCE_TYPE_PROPERTY = '{DAV:}resourcetype';
31+
private const ME_CARD_PROPERTY = '{http://calendarserver.org/ns/}me-card';
32+
private const CALENDAR_TRANSP_PROPERTY = '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp';
3033

3134
/** @var IDBConnection */
3235
private $connection;
@@ -53,7 +56,7 @@ public function getName() {
5356
public function run(IOutput $output) {
5457
$query = $this->connection->getQueryBuilder();
5558
$updated = $query->delete('properties')
56-
->where($query->expr()->eq('propertyname', $query->createNamedParameter(self::RESOURCE_TYPE_PROPERTY)))
59+
->where($query->expr()->in('propertyname', $query->createNamedParameter([self::RESOURCE_TYPE_PROPERTY, self::ME_CARD_PROPERTY, self::CALENDAR_TRANSP_PROPERTY], IQueryBuilder::PARAM_STR_ARRAY)))
5760
->andWhere($query->expr()->eq('propertyvalue', $query->createNamedParameter('Object')))
5861
->executeStatement();
5962

0 commit comments

Comments
 (0)