Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-26 00:06:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-26 00:06:28 +0300
commiteb7390edf3afd52174b786fff1e06d5ffae0cec5 (patch)
tree395dce44e5ea2b55704414e4d38fc24da4b1b676 /db
parent801ced25ff0540b096c395f9ac8d2d9e005878e8 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20191124150431_change_label_id_index_to_include_action_on_label_events.rb21
-rw-r--r--db/schema.rb4
2 files changed, 23 insertions, 2 deletions
diff --git a/db/migrate/20191124150431_change_label_id_index_to_include_action_on_label_events.rb b/db/migrate/20191124150431_change_label_id_index_to_include_action_on_label_events.rb
new file mode 100644
index 00000000000..bd138adc5fa
--- /dev/null
+++ b/db/migrate/20191124150431_change_label_id_index_to_include_action_on_label_events.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class ChangeLabelIdIndexToIncludeActionOnLabelEvents < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index(:resource_label_events, %I[label_id action])
+
+ remove_concurrent_index(:resource_label_events, :label_id)
+ end
+
+ def down
+ add_concurrent_index(:resource_label_events, :label_id)
+
+ remove_concurrent_index(:resource_label_events, %I[label_id action])
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 8c8b48f0bbe..9dccceb79f0 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2019_11_19_023952) do
+ActiveRecord::Schema.define(version: 2019_11_24_150431) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
@@ -3477,7 +3477,7 @@ ActiveRecord::Schema.define(version: 2019_11_19_023952) do
t.text "reference_html"
t.index ["epic_id"], name: "index_resource_label_events_on_epic_id"
t.index ["issue_id"], name: "index_resource_label_events_on_issue_id"
- t.index ["label_id"], name: "index_resource_label_events_on_label_id"
+ t.index ["label_id", "action"], name: "index_resource_label_events_on_label_id_and_action"
t.index ["merge_request_id"], name: "index_resource_label_events_on_merge_request_id"
t.index ["user_id"], name: "index_resource_label_events_on_user_id"
end