summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorLucas Charles <me@lucascharles.me>2019-06-17 09:45:40 -0700
committerLucas Charles <me@lucascharles.me>2019-06-17 11:38:35 -0700
commit5d76e0911c1bbdae992112cba7ca9c591053d368 (patch)
tree845f5e627c1e7373df2311d2571677eec52bede4 /db
parent89a89b3230717920410de6fb6d6b7152ef41a03e (diff)
downloadgitlab-ce-5d76e0911c1bbdae992112cba7ca9c591053d368.tar.gz
Backport approval MR rules report_type migration to CEbackport-report_approver-migration-to-ce
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190521174505_add_report_type_to_approval_merge_request_rules.rb13
-rw-r--r--db/schema.rb1
2 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20190521174505_add_report_type_to_approval_merge_request_rules.rb b/db/migrate/20190521174505_add_report_type_to_approval_merge_request_rules.rb
new file mode 100644
index 00000000000..eafffd4f5a3
--- /dev/null
+++ b/db/migrate/20190521174505_add_report_type_to_approval_merge_request_rules.rb
@@ -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
diff --git a/db/schema.rb b/db/schema.rb
index a50ab02f718..b7dd096aea7 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -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