diff --git a/config/application_setting_columns/elasticsearch_analyzers_kuromoji_enabled.yml b/config/application_setting_columns/elasticsearch_analyzers_kuromoji_enabled.yml deleted file mode 100644 index 2ebf9465bb4f2c551981e0b32c1b82a1e0343937..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_analyzers_kuromoji_enabled.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -api_type: -attr: elasticsearch_analyzers_kuromoji_enabled -clusterwide: true -column: elasticsearch_analyzers_kuromoji_enabled -db_type: boolean -default: 'false' -description: -encrypted: false -gitlab_com_different_than_default: false -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_analyzers_kuromoji_search.yml b/config/application_setting_columns/elasticsearch_analyzers_kuromoji_search.yml deleted file mode 100644 index 9eb0162ccf0f8e6730483e87dfbc9934d9dfa300..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_analyzers_kuromoji_search.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -api_type: -attr: elasticsearch_analyzers_kuromoji_search -clusterwide: true -column: elasticsearch_analyzers_kuromoji_search -db_type: boolean -default: 'false' -description: -encrypted: false -gitlab_com_different_than_default: false -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_analyzers_smartcn_enabled.yml b/config/application_setting_columns/elasticsearch_analyzers_smartcn_enabled.yml deleted file mode 100644 index abbe0bd6698fc983900c0f15dd41fbb450f8157e..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_analyzers_smartcn_enabled.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -api_type: -attr: elasticsearch_analyzers_smartcn_enabled -clusterwide: true -column: elasticsearch_analyzers_smartcn_enabled -db_type: boolean -default: 'false' -description: -encrypted: false -gitlab_com_different_than_default: false -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_analyzers_smartcn_search.yml b/config/application_setting_columns/elasticsearch_analyzers_smartcn_search.yml deleted file mode 100644 index 2f35b0f712d91e4984c9cdf79f4cf8788e31695c..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_analyzers_smartcn_search.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -api_type: -attr: elasticsearch_analyzers_smartcn_search -clusterwide: true -column: elasticsearch_analyzers_smartcn_search -db_type: boolean -default: 'false' -description: -encrypted: false -gitlab_com_different_than_default: false -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_aws.yml b/config/application_setting_columns/elasticsearch_aws.yml deleted file mode 100644 index 0dd697cc4f3d5150ada93c830c4859e760a531f3..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_aws.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -api_type: boolean -attr: elasticsearch_aws -clusterwide: false -column: elasticsearch_aws -db_type: boolean -default: 'false' -description: Enable the use of AWS hosted Elasticsearch. Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: false -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_aws_access_key.yml b/config/application_setting_columns/elasticsearch_aws_access_key.yml deleted file mode 100644 index 0d688af1aca7d61487baabf76213a7238197cccb..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_aws_access_key.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -api_type: string -attr: elasticsearch_aws_access_key -clusterwide: false -column: elasticsearch_aws_access_key -db_type: character -default: -description: AWS IAM access key. Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: true -jihu: false -not_null: false diff --git a/config/application_setting_columns/elasticsearch_aws_region.yml b/config/application_setting_columns/elasticsearch_aws_region.yml deleted file mode 100644 index 81f2052ce488982f6fd87f111344d83b6c9f27d3..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_aws_region.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -api_type: string -attr: elasticsearch_aws_region -clusterwide: false -column: elasticsearch_aws_region -db_type: character -default: "'us-east-1'::character" -description: The AWS region the Elasticsearch domain is configured. Premium and Ultimate - only. -encrypted: false -gitlab_com_different_than_default: false -jihu: false -not_null: false diff --git a/config/application_setting_columns/elasticsearch_client_request_timeout.yml b/config/application_setting_columns/elasticsearch_client_request_timeout.yml deleted file mode 100644 index 27eea3611ab3f6b2534fd4af0c14da01e7eb6cb8..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_client_request_timeout.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -api_type: -attr: elasticsearch_client_request_timeout -clusterwide: false -column: elasticsearch_client_request_timeout -db_type: integer -default: '0' -description: -encrypted: false -gitlab_com_different_than_default: true -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_indexed_field_length_limit.yml b/config/application_setting_columns/elasticsearch_indexed_field_length_limit.yml deleted file mode 100644 index d92a57c30a33ee56d33c39b11a98d7f01115c37a..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_indexed_field_length_limit.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -api_type: integer -attr: elasticsearch_indexed_field_length_limit -clusterwide: false -column: elasticsearch_indexed_field_length_limit -db_type: integer -default: '0' -description: Maximum size of text fields to index by Elasticsearch. 0 value means - no limit. This does not apply to repository and wiki indexing. Premium and Ultimate - only. -encrypted: false -gitlab_com_different_than_default: true -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_indexed_file_size_limit_kb.yml b/config/application_setting_columns/elasticsearch_indexed_file_size_limit_kb.yml deleted file mode 100644 index 5e251d339cff7570f959432815894e966e575f02..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_indexed_file_size_limit_kb.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -api_type: integer -attr: elasticsearch_indexed_file_size_limit_kb -clusterwide: false -column: elasticsearch_indexed_file_size_limit_kb -db_type: integer -default: '1024' -description: Maximum size of repository and wiki files that are indexed by Elasticsearch. - Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: false -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_indexing.yml b/config/application_setting_columns/elasticsearch_indexing.yml deleted file mode 100644 index fc711e7cfa6e0cfe9f9bfecd9a093cf76946f41d..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_indexing.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -api_type: boolean -attr: elasticsearch_indexing -clusterwide: false -column: elasticsearch_indexing -db_type: boolean -default: 'false' -description: Enable Elasticsearch indexing. Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: true -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_limit_indexing.yml b/config/application_setting_columns/elasticsearch_limit_indexing.yml deleted file mode 100644 index 21b2ab323814d7cb993fc4fed6bd40619bb9a8dd..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_limit_indexing.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -api_type: boolean -attr: elasticsearch_limit_indexing -clusterwide: false -column: elasticsearch_limit_indexing -db_type: boolean -default: 'false' -description: Limit Elasticsearch to index certain namespaces and projects. Premium - and Ultimate only. -encrypted: false -gitlab_com_different_than_default: true -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_max_bulk_concurrency.yml b/config/application_setting_columns/elasticsearch_max_bulk_concurrency.yml deleted file mode 100644 index 2ac91c8212fb81bcffc78a64a20e6f32721fe17c..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_max_bulk_concurrency.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -api_type: integer -attr: elasticsearch_max_bulk_concurrency -clusterwide: false -column: elasticsearch_max_bulk_concurrency -db_type: smallint -default: '10' -description: Maximum concurrency of Elasticsearch bulk requests per indexing operation. - This only applies to repository indexing operations. Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: false -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_max_bulk_size_mb.yml b/config/application_setting_columns/elasticsearch_max_bulk_size_mb.yml deleted file mode 100644 index 8f34614eb01ec251713e98f686f23163e7556f3f..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_max_bulk_size_mb.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -api_type: integer -attr: elasticsearch_max_bulk_size_mb -clusterwide: false -column: elasticsearch_max_bulk_size_mb -db_type: smallint -default: '10' -description: Maximum size of Elasticsearch bulk indexing requests in MB. This only - applies to repository indexing operations. Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: false -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_max_code_indexing_concurrency.yml b/config/application_setting_columns/elasticsearch_max_code_indexing_concurrency.yml deleted file mode 100644 index 04fb503e675390e6fe16086ca22e4c5471292874..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_max_code_indexing_concurrency.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -api_type: integer -attr: elasticsearch_max_code_indexing_concurrency -clusterwide: false -column: elasticsearch_max_code_indexing_concurrency -db_type: integer -default: '30' -description: Maximum concurrency of Elasticsearch code indexing background jobs. This - only applies to repository indexing operations. Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: true -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_pause_indexing.yml b/config/application_setting_columns/elasticsearch_pause_indexing.yml deleted file mode 100644 index df0e4fe8887f02e7bb2a7a2a20d24a96df94b568..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_pause_indexing.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -api_type: -attr: elasticsearch_pause_indexing -clusterwide: false -column: elasticsearch_pause_indexing -db_type: boolean -default: 'false' -description: -encrypted: false -gitlab_com_different_than_default: false -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_requeue_workers.yml b/config/application_setting_columns/elasticsearch_requeue_workers.yml deleted file mode 100644 index ea126b109a5aafe2dc0df34bf7d7cba7ff873138..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_requeue_workers.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -api_type: boolean -attr: elasticsearch_requeue_workers -clusterwide: false -column: elasticsearch_requeue_workers -db_type: boolean -default: 'false' -description: Enable automatic requeuing of indexing workers. This improves non-code - indexing throughput by enqueuing Sidekiq jobs until all documents are processed. - Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: true -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_retry_on_failure.yml b/config/application_setting_columns/elasticsearch_retry_on_failure.yml deleted file mode 100644 index 96a2a0072efe7f4228d53acce1ad19ad8bfea29c..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_retry_on_failure.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -api_type: integer -attr: elasticsearch_retry_on_failure -clusterwide: false -column: elasticsearch_retry_on_failure -db_type: integer -default: '0' -description: Maximum number of possible retries for Elasticsearch search requests. - Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: true -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_search.yml b/config/application_setting_columns/elasticsearch_search.yml deleted file mode 100644 index 9db5c1504e2c706e0f8ea7ae89a7d688a60b38a1..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_search.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -api_type: boolean -attr: elasticsearch_search -clusterwide: false -column: elasticsearch_search -db_type: boolean -default: 'false' -description: Enable Elasticsearch search. Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: true -jihu: false -not_null: true diff --git a/config/application_setting_columns/elasticsearch_username.yml b/config/application_setting_columns/elasticsearch_username.yml deleted file mode 100644 index d1f089a93f61858b02bed0d9aeb50f9b85359bf6..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_username.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -api_type: string -attr: elasticsearch_username -clusterwide: false -column: elasticsearch_username -db_type: text -default: -description: The `username` of your Elasticsearch instance. Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: true -jihu: false -not_null: false diff --git a/config/application_setting_columns/elasticsearch_worker_number_of_shards.yml b/config/application_setting_columns/elasticsearch_worker_number_of_shards.yml deleted file mode 100644 index c86e2507023633ac32deb10ab2898ef9bb7d5e6d..0000000000000000000000000000000000000000 --- a/config/application_setting_columns/elasticsearch_worker_number_of_shards.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -api_type: integer -attr: elasticsearch_worker_number_of_shards -clusterwide: false -column: elasticsearch_worker_number_of_shards -db_type: integer -default: '2' -description: Number of indexing worker shards. This improves non-code indexing throughput - by enqueuing more parallel Sidekiq jobs. Default is `2`. Premium and Ultimate only. -encrypted: false -gitlab_com_different_than_default: true -jihu: false -not_null: true diff --git a/db/post_migrate/20250217121107_remove_elasticsearch_settings_from_application_settings.rb b/db/post_migrate/20250217121107_remove_elasticsearch_settings_from_application_settings.rb new file mode 100644 index 0000000000000000000000000000000000000000..7074e541083eff0d40375eb4ae4b127b5059c5bc --- /dev/null +++ b/db/post_migrate/20250217121107_remove_elasticsearch_settings_from_application_settings.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +class RemoveElasticsearchSettingsFromApplicationSettings < Gitlab::Database::Migration[2.2] + disable_ddl_transaction! + milestone '17.10' + + def up + with_lock_retries do + remove_column :application_settings, :elasticsearch_aws + remove_column :application_settings, :elasticsearch_search + remove_column :application_settings, :elasticsearch_indexing + remove_column :application_settings, :elasticsearch_username + remove_column :application_settings, :elasticsearch_aws_region + remove_column :application_settings, :elasticsearch_aws_access_key + remove_column :application_settings, :elasticsearch_limit_indexing + remove_column :application_settings, :elasticsearch_pause_indexing + remove_column :application_settings, :elasticsearch_requeue_workers + remove_column :application_settings, :elasticsearch_max_bulk_size_mb + remove_column :application_settings, :elasticsearch_retry_on_failure + remove_column :application_settings, :elasticsearch_max_bulk_concurrency + remove_column :application_settings, :elasticsearch_client_request_timeout + remove_column :application_settings, :elasticsearch_worker_number_of_shards + remove_column :application_settings, :elasticsearch_analyzers_smartcn_search + remove_column :application_settings, :elasticsearch_analyzers_kuromoji_search + remove_column :application_settings, :elasticsearch_analyzers_smartcn_enabled + remove_column :application_settings, :elasticsearch_analyzers_kuromoji_enabled + remove_column :application_settings, :elasticsearch_indexed_field_length_limit + remove_column :application_settings, :elasticsearch_indexed_file_size_limit_kb + remove_column :application_settings, :elasticsearch_max_code_indexing_concurrency + end + end + + def down + with_lock_retries do + add_column :application_settings, :elasticsearch_aws, :boolean, default: false, null: false + add_column :application_settings, :elasticsearch_search, :boolean, default: false, null: false + add_column :application_settings, :elasticsearch_indexing, :boolean, default: false, null: false + add_column :application_settings, :elasticsearch_username, :text + add_column :application_settings, :elasticsearch_aws_region, 'character varying', default: 'us-east-1' + add_column :application_settings, :elasticsearch_aws_access_key, 'character varying' + add_column :application_settings, :elasticsearch_limit_indexing, :boolean, default: false, null: false + add_column :application_settings, :elasticsearch_pause_indexing, :boolean, default: false, null: false + add_column :application_settings, :elasticsearch_requeue_workers, :boolean, default: false, null: false + add_column :application_settings, :elasticsearch_max_bulk_size_mb, :smallint, default: 10, null: false + add_column :application_settings, :elasticsearch_retry_on_failure, :integer, default: 0, null: false + add_column :application_settings, :elasticsearch_max_bulk_concurrency, :smallint, default: 10, null: false + add_column :application_settings, :elasticsearch_client_request_timeout, :integer, default: 0, null: false + add_column :application_settings, :elasticsearch_worker_number_of_shards, :integer, default: 2, null: false + add_column :application_settings, :elasticsearch_analyzers_smartcn_search, :boolean, default: false, null: false + add_column :application_settings, :elasticsearch_analyzers_kuromoji_search, :boolean, default: false, null: false + add_column :application_settings, :elasticsearch_analyzers_smartcn_enabled, :boolean, default: false, null: false + add_column :application_settings, :elasticsearch_analyzers_kuromoji_enabled, :boolean, default: false, null: false + add_column :application_settings, :elasticsearch_indexed_field_length_limit, :integer, default: 0, null: false + add_column :application_settings, :elasticsearch_indexed_file_size_limit_kb, :integer, default: 1024, null: false + add_column :application_settings, :elasticsearch_max_code_indexing_concurrency, :integer, default: 30, null: false + end + + add_check_constraint(:application_settings, 'char_length(elasticsearch_username) <= 255', 'check_e5024c8801') + end +end diff --git a/db/schema_migrations/20250217121107 b/db/schema_migrations/20250217121107 new file mode 100644 index 0000000000000000000000000000000000000000..3b1ebf5309371760961e67565c6b7b5ac6c35058 --- /dev/null +++ b/db/schema_migrations/20250217121107 @@ -0,0 +1 @@ +a87dfeeb1bffdf43d12fc05989d84e4dc5751351aeab5620a286a4c644ffa848 \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 02c41dd0a72b472d4f5be63f5c42606f5ad92d7f..85df8304ebf45b7baae8090a367ab2af6449af43 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -8322,27 +8322,6 @@ CREATE TABLE application_settings ( encrypted_ci_job_token_signing_key_iv bytea, elasticsearch jsonb DEFAULT '{}'::jsonb NOT NULL, oauth_provider jsonb DEFAULT '{}'::jsonb NOT NULL, - elasticsearch_aws boolean DEFAULT false NOT NULL, - elasticsearch_search boolean DEFAULT false NOT NULL, - elasticsearch_indexing boolean DEFAULT false NOT NULL, - elasticsearch_username text, - elasticsearch_aws_region character varying DEFAULT 'us-east-1'::character varying, - elasticsearch_aws_access_key character varying, - elasticsearch_limit_indexing boolean DEFAULT false NOT NULL, - elasticsearch_pause_indexing boolean DEFAULT false NOT NULL, - elasticsearch_requeue_workers boolean DEFAULT false NOT NULL, - elasticsearch_max_bulk_size_mb smallint DEFAULT 10 NOT NULL, - elasticsearch_retry_on_failure integer DEFAULT 0 NOT NULL, - elasticsearch_max_bulk_concurrency smallint DEFAULT 10 NOT NULL, - elasticsearch_client_request_timeout integer DEFAULT 0 NOT NULL, - elasticsearch_worker_number_of_shards integer DEFAULT 2 NOT NULL, - elasticsearch_analyzers_smartcn_search boolean DEFAULT false NOT NULL, - elasticsearch_analyzers_kuromoji_search boolean DEFAULT false NOT NULL, - elasticsearch_analyzers_smartcn_enabled boolean DEFAULT false NOT NULL, - elasticsearch_analyzers_kuromoji_enabled boolean DEFAULT false NOT NULL, - elasticsearch_indexed_field_length_limit integer DEFAULT 0 NOT NULL, - elasticsearch_indexed_file_size_limit_kb integer DEFAULT 1024 NOT NULL, - elasticsearch_max_code_indexing_concurrency integer DEFAULT 30 NOT NULL, observability_settings jsonb DEFAULT '{}'::jsonb NOT NULL, search jsonb DEFAULT '{}'::jsonb NOT NULL, anti_abuse_settings jsonb DEFAULT '{}'::jsonb NOT NULL, @@ -8423,7 +8402,6 @@ CREATE TABLE application_settings ( CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)), CONSTRAINT check_e2692d7523 CHECK ((char_length(default_preferred_language) <= 32)), CONSTRAINT check_e2dd6e290a CHECK ((char_length(jira_connect_application_key) <= 255)), - CONSTRAINT check_e5024c8801 CHECK ((char_length(elasticsearch_username) <= 255)), CONSTRAINT check_e5aba18f02 CHECK ((char_length(container_registry_version) <= 255)), CONSTRAINT check_ef6176834f CHECK ((char_length(encrypted_cloud_license_auth_token_iv) <= 255)), CONSTRAINT check_identity_verification_settings_is_hash CHECK ((jsonb_typeof(identity_verification_settings) = 'object'::text)) diff --git a/doc/development/cells/application_settings_analysis.md b/doc/development/cells/application_settings_analysis.md index 3fee913e8690d806e1c5a540839f7472d8297054..e1dddf5da80e3356c4da0cea43bc439524976289 100644 --- a/doc/development/cells/application_settings_analysis.md +++ b/doc/development/cells/application_settings_analysis.md @@ -14,12 +14,12 @@ title: Application Settings analysis ## Statistics -- Number of attributes: 513 +- Number of attributes: 492 - Number of encrypted attributes: 41 (8.0%) -- Number of attributes documented: 313 (61.0%) -- Number of attributes on GitLab.com different from the defaults: 233 (45.0%) -- Number of attributes with `clusterwide` set: 513 (100.0%) -- Number of attributes with `clusterwide: true` set: 127 (25.0%) +- Number of attributes documented: 298 (61.0%) +- Number of attributes on GitLab.com different from the defaults: 222 (45.0%) +- Number of attributes with `clusterwide` set: 492 (100.0%) +- Number of attributes with `clusterwide: true` set: 123 (25.0%) ## Individual columns @@ -156,30 +156,9 @@ title: Application Settings analysis | `eks_integration_enabled` | `false` | `boolean` | `boolean` | `true` | `false` | `true` | `true`| `true` | | `eks_secret_access_key` | `true` | `text` | `string` | `false` | `null` | `true` | `true`| `true` | | `elasticsearch` | `false` | `jsonb` | `` | `true` | `'{}'::jsonb` | `true` | `false`| `false` | -| `elasticsearch_analyzers_kuromoji_enabled` | `false` | `boolean` | `` | `true` | `false` | `false` | `true`| `false` | -| `elasticsearch_analyzers_kuromoji_search` | `false` | `boolean` | `` | `true` | `false` | `false` | `true`| `false` | -| `elasticsearch_analyzers_smartcn_enabled` | `false` | `boolean` | `` | `true` | `false` | `false` | `true`| `false` | -| `elasticsearch_analyzers_smartcn_search` | `false` | `boolean` | `` | `true` | `false` | `false` | `true`| `false` | -| `elasticsearch_aws` | `false` | `boolean` | `boolean` | `true` | `false` | `false` | `false`| `true` | -| `elasticsearch_aws_access_key` | `false` | `character` | `string` | `false` | `null` | `true` | `false`| `true` | -| `elasticsearch_aws_region` | `false` | `character` | `string` | `false` | `'us-east-1'::character` | `false` | `false`| `true` | | `elasticsearch_aws_secret_access_key` | `true` | `text` | `string` | `false` | `null` | `true` | `false`| `true` | -| `elasticsearch_client_request_timeout` | `false` | `integer` | `` | `true` | `0` | `true` | `false`| `false` | -| `elasticsearch_indexed_field_length_limit` | `false` | `integer` | `integer` | `true` | `0` | `true` | `false`| `true` | -| `elasticsearch_indexed_file_size_limit_kb` | `false` | `integer` | `integer` | `true` | `1024` | `false` | `false`| `true` | -| `elasticsearch_indexing` | `false` | `boolean` | `boolean` | `true` | `false` | `true` | `false`| `true` | -| `elasticsearch_limit_indexing` | `false` | `boolean` | `boolean` | `true` | `false` | `true` | `false`| `true` | -| `elasticsearch_max_bulk_concurrency` | `false` | `smallint` | `integer` | `true` | `10` | `false` | `false`| `true` | -| `elasticsearch_max_bulk_size_mb` | `false` | `smallint` | `integer` | `true` | `10` | `false` | `false`| `true` | -| `elasticsearch_max_code_indexing_concurrency` | `false` | `integer` | `integer` | `true` | `30` | `true` | `false`| `true` | | `elasticsearch_password` | `true` | `bytea` | `string` | `false` | `null` | `true` | `false`| `true` | -| `elasticsearch_pause_indexing` | `false` | `boolean` | `` | `true` | `false` | `false` | `false`| `false` | -| `elasticsearch_requeue_workers` | `false` | `boolean` | `boolean` | `true` | `false` | `true` | `false`| `true` | -| `elasticsearch_retry_on_failure` | `false` | `integer` | `integer` | `true` | `0` | `true` | `false`| `true` | -| `elasticsearch_search` | `false` | `boolean` | `boolean` | `true` | `false` | `true` | `false`| `true` | | `elasticsearch_url` | `false` | `character` | `string` | `false` | `'http://localhost:9200'::character` | `true` | `false`| `true` | -| `elasticsearch_username` | `false` | `text` | `string` | `false` | `null` | `true` | `false`| `true` | -| `elasticsearch_worker_number_of_shards` | `false` | `integer` | `integer` | `true` | `2` | `true` | `false`| `true` | | `email_additional_text` | `false` | `character` | `string` | `false` | `null` | `true` | `true`| `true` | | `email_author_in_body` | `false` | `boolean` | `boolean` | `false` | `false` | `false` | `true`| `true` | | `email_confirmation_setting` | `false` | `smallint` | `string` | `false` | `0` | `true` | `true`| `true` | diff --git a/scripts/migration_schema_validator.rb b/scripts/migration_schema_validator.rb index ca7c53c75fe22336614c78dda700d3e917a0b783..ad607a59ac5ba31fbf66c591f80e72ee3ed181d0 100644 --- a/scripts/migration_schema_validator.rb +++ b/scripts/migration_schema_validator.rb @@ -106,7 +106,7 @@ def check_file(file_path) next unless File.exist?(model_file_path) model_content = File.read(model_file_path) - next if model_content.match?(/\s(ignore_column|ignore_columns)\s(:|%i\[)\s*#{column}/) + next if model_content.match?(/\s(ignore_column|ignore_columns)\s(:|%i\[).*?#{column}\b/m) @models_missing_ignore[model_name.to_s] << column end