Commit 6a8ce2a1 authored by Kerri Miller's avatar Kerri Miller Committed by Toon Claes

Add default_branch_name column to namespace_settings table

parent deef6929
---
title: Add :default_branch_name column to namespace_settings
merge_request: 42778
author:
type: added
# frozen_string_literal: true
class AddDefaultBranchNameToNamespaceSettings < ActiveRecord::Migration[6.0]
DOWNTIME = false
# rubocop:disable Migration/AddLimitToTextColumns
# limit is added in 20200919204155_add_text_limit_to_namespace_settings_default_branch_name
#
def change
add_column :namespace_settings, :default_branch_name, :text
end
# rubocop:enable Migration/AddLimitToTextColumns
end
# frozen_string_literal: true
class AddTextLimitToNamespaceSettingsDefaultBranchName < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_text_limit :namespace_settings, :default_branch_name, 255
end
def down
# Down is required as `add_text_limit` is not reversible
#
remove_text_limit :namespace_settings, :default_branch_name
end
end
f33c66297ca7848c576778dc275e42801f5f9d7cdcf8c4d2fb205d4eb9770937
\ No newline at end of file
097cb7a36fdc831045f3a33a047f8bda6474b8165ef5fc95dbdeea45d0ac04a3
\ No newline at end of file
......@@ -13562,7 +13562,9 @@ CREATE TABLE namespace_settings (
updated_at timestamp with time zone NOT NULL,
namespace_id integer NOT NULL,
prevent_forking_outside_group boolean DEFAULT false NOT NULL,
allow_mfa_for_subgroups boolean DEFAULT true NOT NULL
allow_mfa_for_subgroups boolean DEFAULT true NOT NULL,
default_branch_name text,
CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255))
);
CREATE TABLE namespace_statistics (
......
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