debian-mirror-gitlab/db/migrate/20220419223906_add_arkose_namespace_to_application_settings.rb
2022-07-16 19:58:13 +02:00

24 lines
628 B
Ruby

# frozen_string_literal: true
class AddArkoseNamespaceToApplicationSettings < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
ARKOSE_LABS_DEFAULT_NAMESPACE = 'client'
def up
unless column_exists?(:application_settings, :arkose_labs_namespace)
add_column :application_settings,
:arkose_labs_namespace,
:text,
default: ARKOSE_LABS_DEFAULT_NAMESPACE,
null: false
end
add_text_limit :application_settings, :arkose_labs_namespace, 255
end
def down
remove_column :application_settings, :arkose_labs_namespace
end
end