Commit 189c2075 authored by Nick Thomas's avatar Nick Thomas

Add a column to track when a project default branch changes

parent 132a369d
# frozen_string_literal: true
class AddProjectSettingsPreviousDefaultBranch < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
# rubocop:disable Migration/AddLimitToTextColumns
# limit is added in 20210707173645_add_project_settings_previous_default_branch_text_limit
def up
with_lock_retries do
add_column :project_settings, :previous_default_branch, :text
end
end
# rubocop:enable Migration/AddLimitToTextColumns
def down
with_lock_retries do
remove_column :project_settings, :previous_default_branch
end
end
end
# frozen_string_literal: true
class AddProjectSettingsPreviousDefaultBranchTextLimit < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
def up
add_text_limit :project_settings, :previous_default_branch, 4096
end
def down
remove_text_limit :project_settings, :previous_default_branch
end
end
02aea8fe759614bc3aa751e023aa508963f8183366f6d6f518bbccc2d85ec1a1
\ No newline at end of file
e440dac0e14df7309c84e72b98ed6373c712901dc66310a474979e0fce7dc59c
\ No newline at end of file
......@@ -17081,6 +17081,8 @@ CREATE TABLE project_settings (
prevent_merge_without_jira_issue boolean DEFAULT false NOT NULL,
cve_id_request_enabled boolean DEFAULT true NOT NULL,
mr_default_target_self boolean DEFAULT false NOT NULL,
previous_default_branch text,
CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)),
CONSTRAINT check_bde223416c CHECK ((show_default_award_emojis IS NOT NULL))
);
......@@ -137,6 +137,7 @@ project_setting:
- has_confluence
- has_vulnerabilities
- prevent_merge_without_jira_issue
- previous_default_branch
- project_id
- push_rule_id
- show_default_award_emojis
......
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