From 1a9c4e37561868fafb801b6201eddd21040c8254 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 6 Oct 2022 18:41:15 +0530 Subject: [PATCH] fix: mysql indexes issue --- app/config/collections.php | 114 ++++++++++++++++++------------------- docker-compose.yml | 90 ++++++++++++++++++++--------- 2 files changed, 120 insertions(+), 84 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 334c1ae40..4297721db 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -2896,7 +2896,7 @@ $collections = [ '$id' => 'compression', 'type' => Database::VAR_STRING, 'signed' => true, - 'size' => 10, + 'size' => 128, 'format' => '', 'filters' => [], 'required' => true, @@ -3379,62 +3379,62 @@ $collections = [ ], ], 'indexes' => [ - [ - '$id' => ID::custom('_key_search'), - 'type' => Database::INDEX_FULLTEXT, - 'attributes' => ['search'], - 'lengths' => [], - 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => ID::custom('_key_bucket'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['bucketId'], - 'lengths' => [Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => ID::custom('_key_name'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['name'], - 'lengths' => [], - 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => ID::custom('_key_signature'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['signature'], - 'lengths' => [], - 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => ID::custom('_key_mimeType'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['mimeType'], - 'lengths' => [127], - 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => ID::custom('_key_sizeOriginal'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['sizeOriginal'], - 'lengths' => [], - 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => ID::custom('_key_chunksTotal'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['chunksTotal'], - 'lengths' => [], - 'orders' => [Database::ORDER_ASC], - ], - [ - '$id' => ID::custom('_key_chunksUploaded'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['chunksUploaded'], - 'lengths' => [], - 'orders' => [Database::ORDER_ASC], - ], + // [ + // '$id' => ID::custom('_key_search'), + // 'type' => Database::INDEX_FULLTEXT, + // 'attributes' => ['search'], + // 'lengths' => [], + // 'orders' => [Database::ORDER_ASC], + // ], + // [ + // '$id' => ID::custom('_key_bucket'), + // 'type' => Database::INDEX_KEY, + // 'attributes' => ['bucketId'], + // 'lengths' => [Database::LENGTH_KEY], + // 'orders' => [Database::ORDER_ASC], + // ], + // [ + // '$id' => ID::custom('_key_name'), + // 'type' => Database::INDEX_KEY, + // 'attributes' => ['name'], + // 'lengths' => [], + // 'orders' => [Database::ORDER_ASC], + // ], + // [ + // '$id' => ID::custom('_key_signature'), + // 'type' => Database::INDEX_KEY, + // 'attributes' => ['signature'], + // 'lengths' => [], + // 'orders' => [Database::ORDER_ASC], + // ], + // [ + // '$id' => ID::custom('_key_mimeType'), + // 'type' => Database::INDEX_KEY, + // 'attributes' => ['mimeType'], + // 'lengths' => [127], + // 'orders' => [Database::ORDER_ASC], + // ], + // [ + // '$id' => ID::custom('_key_sizeOriginal'), + // 'type' => Database::INDEX_KEY, + // 'attributes' => ['sizeOriginal'], + // 'lengths' => [], + // 'orders' => [Database::ORDER_ASC], + // ], + // [ + // '$id' => ID::custom('_key_chunksTotal'), + // 'type' => Database::INDEX_KEY, + // 'attributes' => ['chunksTotal'], + // 'lengths' => [], + // 'orders' => [Database::ORDER_ASC], + // ], + // [ + // '$id' => ID::custom('_key_chunksUploaded'), + // 'type' => Database::INDEX_KEY, + // 'attributes' => ['chunksUploaded'], + // 'lengths' => [], + // 'orders' => [Database::ORDER_ASC], + // ], ] ], diff --git a/docker-compose.yml b/docker-compose.yml index 79a8d218f..bd30de3e9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,30 +10,6 @@ x-logging: &x-logging max-file: '5' max-size: '10m' -x-env-storage: &x-env-storage |- - _APP_STORAGE_DEVICE - _APP_STORAGE_S3_ACCESS_KEY - _APP_STORAGE_S3_SECRET - _APP_STORAGE_S3_REGION - _APP_STORAGE_S3_BUCKET - _APP_STORAGE_DO_SPACES_ACCESS_KEY - _APP_STORAGE_DO_SPACES_SECRET - _APP_STORAGE_DO_SPACES_REGION - _APP_STORAGE_DO_SPACES_BUCKET - _APP_STORAGE_BACKBLAZE_ACCESS_KEY - _APP_STORAGE_BACKBLAZE_SECRET - _APP_STORAGE_BACKBLAZE_REGION - _APP_STORAGE_BACKBLAZE_BUCKET - _APP_STORAGE_DO_SPACES_BUCKET - _APP_STORAGE_LINODE_ACCESS_KEY - _APP_STORAGE_LINODE_SECRET - _APP_STORAGE_LINODE_REGION - _APP_STORAGE_LINODE_BUCKET - _APP_STORAGE_WASABI_ACCESS_KEY - _APP_STORAGE_WASABI_SECRET - _APP_STORAGE_WASABI_REGION - _APP_STORAGE_WASABI_BUCKET - version: '3' services: @@ -154,7 +130,27 @@ services: - _APP_STORAGE_ANTIVIRUS - _APP_STORAGE_ANTIVIRUS_HOST - _APP_STORAGE_ANTIVIRUS_PORT - - *x-env-storage + - _APP_STORAGE_DEVICE + - _APP_STORAGE_S3_ACCESS_KEY + - _APP_STORAGE_S3_SECRET + - _APP_STORAGE_S3_REGION + - _APP_STORAGE_S3_BUCKET + - _APP_STORAGE_DO_SPACES_ACCESS_KEY + - _APP_STORAGE_DO_SPACES_SECRET + - _APP_STORAGE_DO_SPACES_REGION + - _APP_STORAGE_DO_SPACES_BUCKET + - _APP_STORAGE_BACKBLAZE_ACCESS_KEY + - _APP_STORAGE_BACKBLAZE_SECRET + - _APP_STORAGE_BACKBLAZE_REGION + - _APP_STORAGE_BACKBLAZE_BUCKET + - _APP_STORAGE_LINODE_ACCESS_KEY + - _APP_STORAGE_LINODE_SECRET + - _APP_STORAGE_LINODE_REGION + - _APP_STORAGE_LINODE_BUCKET + - _APP_STORAGE_WASABI_ACCESS_KEY + - _APP_STORAGE_WASABI_SECRET + - _APP_STORAGE_WASABI_REGION + - _APP_STORAGE_WASABI_BUCKET - _APP_FUNCTIONS_SIZE_LIMIT - _APP_FUNCTIONS_TIMEOUT - _APP_FUNCTIONS_BUILD_TIMEOUT @@ -311,7 +307,27 @@ services: - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS - - *x-env-storage + - _APP_STORAGE_DEVICE + - _APP_STORAGE_S3_ACCESS_KEY + - _APP_STORAGE_S3_SECRET + - _APP_STORAGE_S3_REGION + - _APP_STORAGE_S3_BUCKET + - _APP_STORAGE_DO_SPACES_ACCESS_KEY + - _APP_STORAGE_DO_SPACES_SECRET + - _APP_STORAGE_DO_SPACES_REGION + - _APP_STORAGE_DO_SPACES_BUCKET + - _APP_STORAGE_BACKBLAZE_ACCESS_KEY + - _APP_STORAGE_BACKBLAZE_SECRET + - _APP_STORAGE_BACKBLAZE_REGION + - _APP_STORAGE_BACKBLAZE_BUCKET + - _APP_STORAGE_LINODE_ACCESS_KEY + - _APP_STORAGE_LINODE_SECRET + - _APP_STORAGE_LINODE_REGION + - _APP_STORAGE_LINODE_BUCKET + - _APP_STORAGE_WASABI_ACCESS_KEY + - _APP_STORAGE_WASABI_SECRET + - _APP_STORAGE_WASABI_REGION + - _APP_STORAGE_WASABI_BUCKET - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_EXECUTOR_SECRET @@ -488,7 +504,27 @@ services: - OPEN_RUNTIMES_NETWORK - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - - *x-env-storage + - _APP_STORAGE_DEVICE + - _APP_STORAGE_S3_ACCESS_KEY + - _APP_STORAGE_S3_SECRET + - _APP_STORAGE_S3_REGION + - _APP_STORAGE_S3_BUCKET + - _APP_STORAGE_DO_SPACES_ACCESS_KEY + - _APP_STORAGE_DO_SPACES_SECRET + - _APP_STORAGE_DO_SPACES_REGION + - _APP_STORAGE_DO_SPACES_BUCKET + - _APP_STORAGE_BACKBLAZE_ACCESS_KEY + - _APP_STORAGE_BACKBLAZE_SECRET + - _APP_STORAGE_BACKBLAZE_REGION + - _APP_STORAGE_BACKBLAZE_BUCKET + - _APP_STORAGE_LINODE_ACCESS_KEY + - _APP_STORAGE_LINODE_SECRET + - _APP_STORAGE_LINODE_REGION + - _APP_STORAGE_LINODE_BUCKET + - _APP_STORAGE_WASABI_ACCESS_KEY + - _APP_STORAGE_WASABI_SECRET + - _APP_STORAGE_WASABI_REGION + - _APP_STORAGE_WASABI_BUCKET - DOCKERHUB_PULL_USERNAME - DOCKERHUB_PULL_PASSWORD