Backport approval MR rules report_type migration to CE

This commit is contained in:
Lucas Charles 2019-06-17 09:45:40 -07:00
parent 89a89b3230
commit 5d76e0911c
No known key found for this signature in database
GPG key ID: 409D04F66C504418
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,13 @@
# frozen_string_literal: true
class AddReportTypeToApprovalMergeRequestRules < ActiveRecord::Migration[5.1]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def change
change_table :approval_merge_request_rules do |t|
t.integer :report_type, limit: 2
end
end
end

View file

@ -248,6 +248,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.boolean "code_owner", default: false, null: false
t.string "name", null: false
t.integer "rule_type", limit: 2, default: 1, null: false
t.integer "report_type", limit: 2
t.index ["merge_request_id", "code_owner", "name"], name: "approval_rule_name_index_for_code_owners", unique: true, where: "(code_owner = true)", using: :btree
t.index ["merge_request_id", "code_owner"], name: "index_approval_merge_request_rules_1", using: :btree
t.index ["merge_request_id", "rule_type", "name"], name: "index_approval_rule_name_for_code_owners_rule_type", unique: true, where: "(rule_type = 2)", using: :btree