diff --git a/app/config/collections.php b/app/config/collections.php index 401a4532f7..89ecffd440 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -2227,14 +2227,14 @@ $collections = [ '$id' => ID::custom('_key_search'), 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], - 'lengths' => [2048], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ '$id' => ID::custom('_key_name'), 'type' => Database::INDEX_KEY, 'attributes' => ['name'], - 'lengths' => [2048], + 'lengths' => [768], 'orders' => [Database::ORDER_ASC], ], [ @@ -2248,21 +2248,21 @@ $collections = [ '$id' => ID::custom('_key_runtime'), 'type' => Database::INDEX_KEY, 'attributes' => ['runtime'], - 'lengths' => [2048], + 'lengths' => [768], 'orders' => [Database::ORDER_ASC], ], [ '$id' => ID::custom('_key_deployment'), 'type' => Database::INDEX_KEY, 'attributes' => ['deployment'], - 'lengths' => [Database::LENGTH_KEY], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ '$id' => ID::custom('_key_schedule'), 'type' => Database::INDEX_KEY, 'attributes' => ['schedule'], - 'lengths' => [128], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ @@ -2432,14 +2432,14 @@ $collections = [ '$id' => ID::custom('_key_resource'), 'type' => Database::INDEX_KEY, 'attributes' => ['resourceId'], - 'lengths' => [Database::LENGTH_KEY], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ '$id' => ID::custom('_key_resource_type'), 'type' => Database::INDEX_KEY, 'attributes' => ['resourceType'], - 'lengths' => [Database::LENGTH_KEY], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ @@ -2453,7 +2453,7 @@ $collections = [ '$id' => ID::custom('_key_entrypoint'), 'type' => Database::INDEX_KEY, 'attributes' => ['entrypoint'], - 'lengths' => [2048], + 'lengths' => [768], 'orders' => [Database::ORDER_ASC], ], [ @@ -2467,7 +2467,7 @@ $collections = [ '$id' => ID::custom('_key_buildId'), 'type' => Database::INDEX_KEY, 'attributes' => ['buildId'], - 'lengths' => [Database::LENGTH_KEY], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ @@ -2968,14 +2968,14 @@ $collections = [ '$id' => ID::custom('_fulltext_name'), 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['name'], - 'lengths' => [1024], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ '$id' => ID::custom('_key_search'), 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], - 'lengths' => [2048], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ @@ -2989,7 +2989,7 @@ $collections = [ '$id' => ID::custom('_key_name'), 'type' => Database::INDEX_KEY, 'attributes' => ['name'], - 'lengths' => [128], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ @@ -3423,7 +3423,7 @@ $collections = [ '$id' => ID::custom('_key_search'), 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'], - 'lengths' => [2048], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ @@ -3437,21 +3437,21 @@ $collections = [ '$id' => ID::custom('_key_name'), 'type' => Database::INDEX_KEY, 'attributes' => ['name'], - 'lengths' => [2048], + 'lengths' => [768], 'orders' => [Database::ORDER_ASC], ], [ '$id' => ID::custom('_key_signature'), 'type' => Database::INDEX_KEY, 'attributes' => ['signature'], - 'lengths' => [2048], + 'lengths' => [768], 'orders' => [Database::ORDER_ASC], ], [ '$id' => ID::custom('_key_mimeType'), 'type' => Database::INDEX_KEY, 'attributes' => ['mimeType'], - 'lengths' => [127], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 8018cd088e..9a5f3f001b 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -127,7 +127,7 @@ App::post('/v1/projects') $collections = Config::getParam('collections', []); $dbForProject->setNamespace("_{$project->getInternalId()}"); - $dbForProject->create(App::getEnv('_APP_DB_SCHEMA', 'appwrite')); + $dbForProject->create(); $audit = new Audit($dbForProject); $audit->setup(); diff --git a/app/http.php b/app/http.php index 4d15cab303..f27bf82353 100644 --- a/app/http.php +++ b/app/http.php @@ -94,7 +94,7 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { try { $redis->flushAll(); Console::success('[Setup] - Creating database: appwrite...'); - $dbForConsole->create(App::getEnv('_APP_DB_SCHEMA', 'appwrite')); + $dbForConsole->create(); } catch (\Exception $e) { Console::success('[Setup] - Skip: metadata table already exists'); } diff --git a/app/preload.php b/app/preload.php index bf8b0bfd1d..8789936417 100644 --- a/app/preload.php +++ b/app/preload.php @@ -35,6 +35,7 @@ foreach ( realpath(__DIR__ . '/../vendor/symfony'), realpath(__DIR__ . '/../vendor/mongodb'), realpath(__DIR__ . '/../vendor/utopia-php/websocket'), // TODO: remove workerman autoload + realpath(__DIR__ . '/../vendor/utopia-php/cache'), // TODO: remove memcache autoload ] as $key => $value ) { if ($value !== false) { diff --git a/composer.json b/composer.json index 2d758adfe6..5a13812a24 100644 --- a/composer.json +++ b/composer.json @@ -43,13 +43,13 @@ "ext-sockets": "*", "appwrite/php-clamav": "1.1.*", "appwrite/php-runtimes": "0.11.*", - "utopia-php/abuse": "0.14.*", + "utopia-php/abuse": "0.16.*", "utopia-php/analytics": "0.2.*", - "utopia-php/audit": "0.15.*", - "utopia-php/cache": "0.6.*", + "utopia-php/audit": "0.17.*", + "utopia-php/cache": "0.8.*", "utopia-php/cli": "0.13.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.26.*", + "utopia-php/database": "0.28.*", "utopia-php/domains": "1.1.*", "utopia-php/framework": "0.23.*", "utopia-php/image": "0.5.*",