Commit 541aff99 authored by Tiger Watson's avatar Tiger Watson

Merge branch '270208-add-application-settings-columns' into 'master'

Add secret detection token revocation columns

See merge request gitlab-org/gitlab!45912
parents e1f05dab 0af3d2b7
---
title: Add secret detection token revocation columns
merge_request: 45912
author:
type: added
# frozen_string_literal: true
class AddSecretDetectionTokenRevocationApplicationSettings < ActiveRecord::Migration[6.0]
DOWNTIME = false
def up
add_column :application_settings, :secret_detection_token_revocation_enabled, :boolean, default: false, null: false
add_column :application_settings, :secret_detection_token_revocation_url, :text, null: true # rubocop:disable Migration/AddLimitToTextColumns
add_column :application_settings, :encrypted_secret_detection_token_revocation_token, :text
add_column :application_settings, :encrypted_secret_detection_token_revocation_token_iv, :text
end
def down
remove_column :application_settings, :secret_detection_token_revocation_enabled
remove_column :application_settings, :secret_detection_token_revocation_url
remove_column :application_settings, :encrypted_secret_detection_token_revocation_token
remove_column :application_settings, :encrypted_secret_detection_token_revocation_token_iv
end
end
# frozen_string_literal: true
class AddTextLimitToSecretDetectionTokenRevocationApplicationSettings < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_text_limit :application_settings, :secret_detection_token_revocation_url, 255
end
def down
remove_text_limit :application_settings, :secret_detection_token_revocation_url
end
end
853dbc604fc8ce4d82e6040aa7a7970ae194f09bafb2749077cd9f48d2708eac
\ No newline at end of file
1d0689b5182ac391473075aeabb0e341fb8634dbf0aa87dbb6d48cc0e61d2ada
\ No newline at end of file
......@@ -9297,11 +9297,16 @@ CREATE TABLE application_settings (
encrypted_ci_jwt_signing_key text,
encrypted_ci_jwt_signing_key_iv text,
container_registry_expiration_policies_worker_capacity integer DEFAULT 0 NOT NULL,
secret_detection_token_revocation_enabled boolean DEFAULT false NOT NULL,
secret_detection_token_revocation_url text,
encrypted_secret_detection_token_revocation_token text,
encrypted_secret_detection_token_revocation_token_iv text,
CONSTRAINT app_settings_registry_exp_policies_worker_capacity_positive CHECK ((container_registry_expiration_policies_worker_capacity >= 0)),
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_85a39b68ff CHECK ((char_length(encrypted_ci_jwt_signing_key_iv) <= 255)),
CONSTRAINT check_9a719834eb CHECK ((char_length(secret_detection_token_revocation_url) <= 255)),
CONSTRAINT check_9c6c447a13 CHECK ((char_length(maintenance_mode_message) <= 255)),
CONSTRAINT check_d03919528d CHECK ((char_length(container_registry_vendor) <= 255)),
CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)),
......
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