Commit 0387e943 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'jh-mr-248-add-content-validation-endpoint' into 'master'

Add content validation endpoint

See merge request gitlab-org/gitlab!72443
parents 4b85003a 308d53d7
# frozen_string_literal: true
class AddContentValidationEndpointToApplicationSettings < Gitlab::Database::Migration[1.0]
def up
# rubocop:disable Migration/AddLimitToTextColumns
add_column :application_settings, :content_validation_endpoint_url, :text, comment: 'JiHu-specific column'
# rubocop:disable Migration/AddLimitToTextColumns
add_column :application_settings, :encrypted_content_validation_api_key, :binary, comment: 'JiHu-specific column'
add_column :application_settings, :encrypted_content_validation_api_key_iv, :binary, comment: 'JiHu-specific column'
add_column :application_settings, :content_validation_endpoint_enabled, :boolean, null: false, default: false, comment: 'JiHu-specific column'
end
def down
remove_column :application_settings, :content_validation_endpoint_url
remove_column :application_settings, :encrypted_content_validation_api_key
remove_column :application_settings, :encrypted_content_validation_api_key_iv
remove_column :application_settings, :content_validation_endpoint_enabled
end
end
# frozen_string_literal: true
class AddTextLimitToApplicationSettingsContentValidationEndpointUrl < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
def up
add_text_limit :application_settings, :content_validation_endpoint_url, 255
end
def down
remove_text_limit :application_settings, :content_validation_endpoint_url
end
end
5316cfddc074ae5a320ba763dd9481b46ba47d30eefa28d6bb5caa9368027598
\ No newline at end of file
e7cf08543f911b5f95f08d4aa6063e05b026e463e71a65b6b8200191de1b02a1
\ No newline at end of file
......@@ -10453,6 +10453,10 @@ CREATE TABLE application_settings (
throttle_authenticated_deprecated_api_period_in_seconds integer DEFAULT 3600 NOT NULL,
throttle_authenticated_deprecated_api_enabled boolean DEFAULT false NOT NULL,
dependency_proxy_ttl_group_policy_worker_capacity smallint DEFAULT 2 NOT NULL,
content_validation_endpoint_url text,
encrypted_content_validation_api_key bytea,
encrypted_content_validation_api_key_iv bytea,
content_validation_endpoint_enabled boolean DEFAULT false NOT NULL,
CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)),
CONSTRAINT app_settings_dep_proxy_ttl_policies_worker_capacity_positive CHECK ((dependency_proxy_ttl_group_policy_worker_capacity >= 0)),
CONSTRAINT app_settings_ext_pipeline_validation_service_url_text_limit CHECK ((char_length(external_pipeline_validation_service_url) <= 255)),
......@@ -10463,6 +10467,7 @@ CREATE TABLE application_settings (
CONSTRAINT check_2dba05b802 CHECK ((char_length(gitpod_url) <= 255)),
CONSTRAINT check_51700b31b5 CHECK ((char_length(default_branch_name) <= 255)),
CONSTRAINT check_57123c9593 CHECK ((char_length(help_page_documentation_base_url) <= 255)),
CONSTRAINT check_5a84c3ffdc CHECK ((char_length(content_validation_endpoint_url) <= 255)),
CONSTRAINT check_718b4458ae CHECK ((char_length(personal_access_token_prefix) <= 20)),
CONSTRAINT check_7227fad848 CHECK ((char_length(rate_limiting_response_text) <= 255)),
CONSTRAINT check_85a39b68ff CHECK ((char_length(encrypted_ci_jwt_signing_key_iv) <= 255)),
......@@ -10476,6 +10481,14 @@ CREATE TABLE application_settings (
CONSTRAINT check_ef6176834f CHECK ((char_length(encrypted_cloud_license_auth_token_iv) <= 255))
);
COMMENT ON COLUMN application_settings.content_validation_endpoint_url IS 'JiHu-specific column';
COMMENT ON COLUMN application_settings.encrypted_content_validation_api_key IS 'JiHu-specific column';
COMMENT ON COLUMN application_settings.encrypted_content_validation_api_key_iv IS 'JiHu-specific column';
COMMENT ON COLUMN application_settings.content_validation_endpoint_enabled IS 'JiHu-specific column';
CREATE SEQUENCE application_settings_id_seq
START WITH 1
INCREMENT BY 1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment