Commit 139ba879 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '224447-add-default_branch_name-to-applicationsettings-model' into 'master'

Add `default_branch_name` to ApplicationSettings model

See merge request gitlab-org/gitlab!35282
parents d13e8efd 37c98e7e
---
title: Add default_branch_name to application_setteings
merge_request: 35282
author:
type: other
# frozen_string_literal: true
class AddDefaultBranchNameToApplicationSettings < ActiveRecord::Migration[6.0]
DOWNTIME = false
# rubocop:disable Migration/AddLimitToTextColumns
# limit is added in db/migrate/20200625190458_add_limit_to_default_branch_name_to_application_settings
def change
add_column :application_settings, :default_branch_name, :text
end
# rubocop:enable Migration/AddLimitToTextColumns
end
# frozen_string_literal: true
class AddLimitToDefaultBranchNameToApplicationSettings < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_text_limit :application_settings, :default_branch_name, 255
end
def down
remove_text_limit :application_settings, :default_branch_name
end
end
......@@ -9144,6 +9144,8 @@ CREATE TABLE public.application_settings (
enforce_pat_expiration boolean DEFAULT true NOT NULL,
compliance_frameworks smallint[] DEFAULT '{}'::smallint[] NOT NULL,
notify_on_unknown_sign_in boolean DEFAULT true NOT NULL,
default_branch_name text,
CONSTRAINT check_51700b31b5 CHECK ((char_length(default_branch_name) <= 255)),
CONSTRAINT check_d03919528d CHECK ((char_length(container_registry_vendor) <= 255)),
CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)),
CONSTRAINT check_e5aba18f02 CHECK ((char_length(container_registry_version) <= 255))
......@@ -23452,7 +23454,9 @@ COPY "schema_migrations" (version) FROM STDIN;
20200623170000
20200623185440
20200624075411
20200624222443
20200625045442
20200625190458
20200626130220
\.
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