diff --git a/app/config/collections/platform.php b/app/config/collections/platform.php index 94d65f4af3..73d42881db 100644 --- a/app/config/collections/platform.php +++ b/app/config/collections/platform.php @@ -6,7 +6,7 @@ use Utopia\Database\Helpers\ID; $providers = Config::getParam('oAuthProviders', []); -return [ +$platformCollections = [ 'projects' => [ '$collection' => ID::custom(Database::METADATA), '$id' => ID::custom('projects'), @@ -1943,3 +1943,31 @@ return [ 'indexes' => [] ], ]; + +// Organization API keys subquery +$platformCollections['teams']['attributes'][] = [ + '$id' => ID::custom('keys'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['subQueryOrganizationKeys'], +]; + +// Account API keys subquery +$platformCollections['users']['attributes'][] = [ + '$id' => ID::custom('keys'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['subQueryAccountKeys'], +]; + +return $platformCollections; \ No newline at end of file