mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Merge pull request #9256 from appwrite/fix-delete-collection-relations
Delete collection before Appwrite's attributes
This commit is contained in:
commit
871043a700
1 changed files with 2 additions and 2 deletions
|
|
@ -535,6 +535,8 @@ class Databases extends Action
|
|||
$databaseId = $database->getId();
|
||||
$databaseInternalId = $database->getInternalId();
|
||||
|
||||
$dbForProject->deleteCollection('database_' . $databaseInternalId . '_collection_' . $collection->getInternalId());
|
||||
|
||||
/**
|
||||
* Related collections relating to current collection
|
||||
*/
|
||||
|
|
@ -553,8 +555,6 @@ class Databases extends Action
|
|||
}
|
||||
);
|
||||
|
||||
$dbForProject->deleteCollection('database_' . $databaseInternalId . '_collection_' . $collection->getInternalId());
|
||||
|
||||
$this->deleteByGroup('attributes', [
|
||||
Query::equal('databaseInternalId', [$databaseInternalId]),
|
||||
Query::equal('collectionInternalId', [$collectionInternalId])
|
||||
|
|
|
|||
Loading…
Reference in a new issue