mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Delete using Cursor
This commit is contained in:
parent
6264e616d3
commit
abc2795daa
1 changed files with 0 additions and 21 deletions
|
|
@ -507,8 +507,6 @@ class Deletes extends Action
|
|||
/**
|
||||
* @var $dbForProject Database
|
||||
*/
|
||||
var_dump($projectTables);
|
||||
var_dump($projectCollectionIds);
|
||||
$dbForProject->foreach(Database::METADATA, function (Document $collection) use ($dbForProject, $projectTables, $projectCollectionIds) {
|
||||
try {
|
||||
if ($projectTables || !\in_array($collection->getId(), $projectCollectionIds)) {
|
||||
|
|
@ -527,25 +525,6 @@ class Deletes extends Action
|
|||
}
|
||||
});
|
||||
|
||||
// $collections = $dbForProject->listCollections(PHP_INT_MAX);
|
||||
// foreach ($collections as $collection) {
|
||||
// try {
|
||||
// if ($projectTables || !\in_array($collection->getId(), $projectCollectionIds)) {
|
||||
// $dbForProject->deleteCollection($collection->getId());
|
||||
// } else {
|
||||
// $this->deleteByGroup(
|
||||
// $collection->getId(),
|
||||
// [
|
||||
// Query::orderAsc()
|
||||
// ],
|
||||
// database: $dbForProject
|
||||
// );
|
||||
// }
|
||||
// } catch (Throwable $e) {
|
||||
// Console::error('Error deleting '.$collection->getId().' '.$e->getMessage());
|
||||
// }
|
||||
// }
|
||||
|
||||
// Delete Platforms
|
||||
$this->deleteByGroup('platforms', [
|
||||
Query::equal('projectInternalId', [$projectInternalId]),
|
||||
|
|
|
|||
Loading…
Reference in a new issue