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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-05 03:08:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-05 03:08:41 +0300
commite40710ab8a30f36d7c82d7d6497033291840eec9 (patch)
treeaea450b24cb1bd8023c1d297e4f01de4e88926b2 /db/migrate/20200204131054_change_broadcast_message_index.rb
parent51612d3ef5be853289008694c40973b479e8547c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200204131054_change_broadcast_message_index.rb')
-rw-r--r--db/migrate/20200204131054_change_broadcast_message_index.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20200204131054_change_broadcast_message_index.rb b/db/migrate/20200204131054_change_broadcast_message_index.rb
new file mode 100644
index 00000000000..9545eacd3a1
--- /dev/null
+++ b/db/migrate/20200204131054_change_broadcast_message_index.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class ChangeBroadcastMessageIndex < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :broadcast_messages, %i(ends_at broadcast_type id), name: 'index_broadcast_message_on_ends_at_and_broadcast_type_and_id'
+ remove_concurrent_index_by_name :broadcast_messages, :index_broadcast_messages_on_starts_at_and_ends_at_and_id
+ end
+
+ def down
+ add_concurrent_index :broadcast_messages, %i(starts_at ends_at id), name: 'index_broadcast_messages_on_starts_at_and_ends_at_and_id'
+ remove_concurrent_index_by_name :broadcast_messages, :index_broadcast_message_on_ends_at_and_broadcast_type_and_id
+ end
+end