Commit 40085e94 authored by Toon Claes's avatar Toon Claes

Merge branch '215193-add-column-section-to-approvalmergerequestrule' into 'master'

Add 'section' to approval_merge_request_rules

Closes #215193

See merge request gitlab-org/gitlab!32003
parents d7df9c2c 1ff6a8ab
# frozen_string_literal: true
class AddSectionToApprovalMergeRequestRule < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
unless column_exists?(:approval_merge_request_rules, :section)
add_column :approval_merge_request_rules, :section, :text
end
add_text_limit :approval_merge_request_rules, :section, 255
end
def down
remove_column :approval_merge_request_rules, :section
end
end
......@@ -479,7 +479,9 @@ CREATE TABLE public.approval_merge_request_rules (
code_owner boolean DEFAULT false NOT NULL,
name character varying NOT NULL,
rule_type smallint DEFAULT 1 NOT NULL,
report_type smallint
report_type smallint,
section text,
CONSTRAINT check_6fca5928b2 CHECK ((char_length(section) <= 255))
);
CREATE TABLE public.approval_merge_request_rules_approved_approvers (
......@@ -13832,6 +13834,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200512164334
20200513160930
20200513171959
20200513224143
20200513234502
20200513235347
20200513235532
......
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