Skip to content

Commit cd6f6d2

Browse files
authored
Remove encryptedFields option when dropping collection (#2788)
The driver already detects encrypted collections
1 parent b7cb9de commit cd6f6d2

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/Doctrine/ODM/MongoDB/SchemaManager.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -699,14 +699,6 @@ public function dropDocumentCollection(string $documentName, ?int $maxTimeMs = n
699699

700700
$options = $this->getWriteOptions($maxTimeMs, $writeConcern);
701701

702-
// When automatic encryption is enabled, we need to drop the metadata collections,
703-
// we don't check if the class metadata has encrypted fields, because
704-
// that does not mean that the existing collection is encrypted or not.
705-
// "esc" and "ecoc" collections cannot be configured
706-
if ($this->dm->getConfiguration()->getDefaultKmsProvider()) {
707-
$options['encryptedFields'] = [];
708-
}
709-
710702
$this->dm->getDocumentCollection($documentName)->drop($options);
711703

712704
if (! $class->isFile) {

0 commit comments

Comments
 (0)