diff --git a/CHANGES.md b/CHANGES.md index fa4db4acc5..bc903e4b31 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -607,7 +607,7 @@ ### Fixes * Fix database exception wrapping by @abnegate in https://github.com/appwrite/appwrite/pull/7787 * Fix exception wrap order by @abnegate in https://github.com/appwrite/appwrite/pull/7818 -* Fix membership query to use sequence by @lohanidamodar in https://github.com/appwrite/appwrite/pull/7834 +* Fix membership query to use internalId by @lohanidamodar in https://github.com/appwrite/appwrite/pull/7834 * Fix vcs silent mode by @vermakhushboo in https://github.com/appwrite/appwrite/pull/7683 * Fix function domain permissions by @stnguyen90 in https://github.com/appwrite/appwrite/pull/7852 * Fix tests required for Cloud by @lohanidamodar in https://github.com/appwrite/appwrite/pull/7777 diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index c74314e905..0bc6f93787 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -2513,7 +2513,7 @@ App::post('/v1/messaging/topics/:topicId/subscribers') 'topicId' => $topicId, 'topicInternalId' => $topic->getSequence(), 'targetId' => $targetId, - 'targetSequence' => $target->getSequence(), + 'targetInternalId' => $target->getSequence(), 'userId' => $user->getId(), 'userInternalId' => $user->getSequence(), 'providerType' => $target->getAttribute('providerType'), diff --git a/app/init/database/filters.php b/app/init/database/filters.php index 7f2282747e..73ff7dc221 100644 --- a/app/init/database/filters.php +++ b/app/init/database/filters.php @@ -329,7 +329,7 @@ Database::addFilter( }, function (mixed $value, Document $document, Database $database) { $targetIds = Authorization::skip(fn () => \array_map( - fn ($document) => $document->getAttribute('targetSequence'), + fn ($document) => $document->getAttribute('targetInternalId'), $database->find('subscribers', [ Query::equal('topicInternalId', [$document->getSequence()]), Query::limit(APP_LIMIT_SUBSCRIBERS_SUBQUERY) diff --git a/composer.json b/composer.json index 9a3c9e8319..7f3c4a574e 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.17.*", - "utopia-php/migration": "0.9.*", + "utopia-php/migration": "dev-feat-sequence as 0.9.3", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 1d84acbb43..58b7d9d387 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cb47e05e104d978efba67c3ccc7bf959", + "content-hash": "92b3f5ad47dd7b23394f27c18713c7e8", "packages": [ { "name": "adhocore/jwt", @@ -3999,16 +3999,16 @@ }, { "name": "utopia-php/migration", - "version": "0.9.3", + "version": "dev-feat-sequence", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "e518d39eb550fde36bc5cf06c9bd7b2faf5dbedd" + "reference": "bef2ad136a86a7747675e0e877f38a8ffe44c39f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/e518d39eb550fde36bc5cf06c9bd7b2faf5dbedd", - "reference": "e518d39eb550fde36bc5cf06c9bd7b2faf5dbedd", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/bef2ad136a86a7747675e0e877f38a8ffe44c39f", + "reference": "bef2ad136a86a7747675e0e877f38a8ffe44c39f", "shasum": "" }, "require": { @@ -4016,7 +4016,7 @@ "ext-curl": "*", "ext-openssl": "*", "php": ">=8.1", - "utopia-php/database": "0.*.*", + "utopia-php/database": "dev-feat-internal-to-sequence as 0.65.5", "utopia-php/dsn": "0.2.*", "utopia-php/framework": "0.33.*", "utopia-php/storage": "0.18.*" @@ -4049,9 +4049,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.9.3" + "source": "https://github.com/utopia-php/migration/tree/feat-sequence" }, - "time": "2025-05-01T05:41:26+00:00" + "time": "2025-05-22T15:27:01+00:00" }, { "name": "utopia-php/orchestration", @@ -8246,11 +8246,18 @@ "version": "dev-feat-internal-to-sequence", "alias": "0.69.5", "alias_normalized": "0.69.5.0" + }, + { + "package": "utopia-php/migration", + "version": "dev-feat-sequence", + "alias": "0.9.3", + "alias_normalized": "0.9.3.0" } ], "minimum-stability": "stable", "stability-flags": { - "utopia-php/database": 20 + "utopia-php/database": 20, + "utopia-php/migration": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/src/Appwrite/Deletes/Targets.php b/src/Appwrite/Deletes/Targets.php index 68a9d675b6..794ab0b87a 100644 --- a/src/Appwrite/Deletes/Targets.php +++ b/src/Appwrite/Deletes/Targets.php @@ -27,7 +27,7 @@ class Targets $database->deleteDocuments( 'subscribers', [ - Query::equal('targetSequence', [$target->getSequence()]), + Query::equal('targetInternalId', [$target->getSequence()]), Query::orderAsc(), ], Database::DELETE_BATCH_SIZE,