Drop collection table in deletes worker
This commit is contained in:
parent
409e42a426
commit
cb7c810207
|
@ -620,8 +620,6 @@ App::delete('/v1/database/collections/:collectionId')
|
|||
throw new Exception('Collection not found', 404);
|
||||
}
|
||||
|
||||
$dbForExternal->deleteCollection($collectionId); // TDOD move to DB worker
|
||||
|
||||
if (!$dbForInternal->deleteDocument('collections', $collectionId)) {
|
||||
throw new Exception('Failed to remove collection from DB', 500);
|
||||
}
|
||||
|
|
|
@ -104,6 +104,7 @@ class DeletesV1 extends Worker
|
|||
$collectionId = $document->getId();
|
||||
|
||||
$dbForInternal = $this->getInternalDB($projectId);
|
||||
$dbForExternal = $this->getExternalDB($projectId);
|
||||
|
||||
$this->deleteByGroup('attributes', [
|
||||
new Query('collectionId', Query::TYPE_EQUAL, [$collectionId])
|
||||
|
@ -113,7 +114,7 @@ class DeletesV1 extends Worker
|
|||
new Query('collectionId', Query::TYPE_EQUAL, [$collectionId])
|
||||
], $dbForInternal);
|
||||
|
||||
$dbForInternal->deleteDocument('collections', $collectionId);
|
||||
$dbForExternal->deleteCollection($collectionId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue