Commit 1ff6a8ab authored by Kerri Miller's avatar Kerri Miller Committed by Toon Claes

Add 'section' to approval_merge_request_rules

parent 2b33257f
# 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