mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
1.5.x version
This commit is contained in:
parent
74ef41857d
commit
2babf7f59d
2 changed files with 11 additions and 14 deletions
12
composer.lock
generated
12
composer.lock
generated
|
|
@ -2731,16 +2731,16 @@
|
|||
"packages-dev": [
|
||||
{
|
||||
"name": "appwrite/sdk-generator",
|
||||
"version": "0.37.10",
|
||||
"version": "0.37.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||
"reference": "d875e74c2d64e11c0f787531cea0b3b3703f476a"
|
||||
"reference": "882881934e8014b2135590e7ea5f402ab4513c38"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d875e74c2d64e11c0f787531cea0b3b3703f476a",
|
||||
"reference": "d875e74c2d64e11c0f787531cea0b3b3703f476a",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/882881934e8014b2135590e7ea5f402ab4513c38",
|
||||
"reference": "882881934e8014b2135590e7ea5f402ab4513c38",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -2776,9 +2776,9 @@
|
|||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||
"support": {
|
||||
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.37.10"
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.37.12"
|
||||
},
|
||||
"time": "2024-04-17T07:55:05+00:00"
|
||||
"time": "2024-04-17T19:14:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/deprecations",
|
||||
|
|
|
|||
|
|
@ -522,18 +522,15 @@ class Databases extends Action
|
|||
Query::equal('databaseInternalId', [$databaseInternalId]),
|
||||
Query::equal('type', [Database::VAR_RELATIONSHIP]),
|
||||
Query::notEqual('collectionInternalId', $collectionInternalId),
|
||||
Query::contains('options', ['"relatedCollection":"'. $collectionId .'"']), // Comment in Version < 1.5
|
||||
Query::contains('options', ['"relatedCollection":"'. $collectionId .'"']),
|
||||
Query::limit(PHP_INT_MAX)
|
||||
]);
|
||||
|
||||
foreach ($attributes as $attribute) {
|
||||
$options = $attribute->getAttribute('options', []);
|
||||
if($options['relatedCollection'] === $collectionId) { // Remove if using contains query above
|
||||
$dbForProject->deleteDocument('attributes', $attribute->getId());
|
||||
Console::success('Deleted document "' . $attribute->getId() . '" related collection successfully');
|
||||
$dbForProject->purgeCachedDocument('database_' . $databaseInternalId, $attribute->getAttribute('collectionId'));
|
||||
$dbForProject->purgeCachedCollection('database_' . $databaseInternalId . '_collection_' . $attribute->getAttribute('collectionInternalId'));
|
||||
}
|
||||
$dbForProject->deleteDocument('attributes', $attribute->getId());
|
||||
Console::success('Deleted document "' . $attribute->getId() . '" related collection successfully');
|
||||
$dbForProject->purgeCachedDocument('database_' . $databaseInternalId, $attribute->getAttribute('collectionId'));
|
||||
$dbForProject->purgeCachedCollection('database_' . $databaseInternalId . '_collection_' . $attribute->getAttribute('collectionInternalId'));
|
||||
}
|
||||
|
||||
$dbForProject->deleteCollection('database_' . $databaseInternalId . '_collection_' . $collection->getInternalId());
|
||||
|
|
|
|||
Loading…
Reference in a new issue