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>2019-12-10 15:07:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 15:07:55 +0300
commit5e11c9b77cb1b2b77ee29359047b55807afe255d (patch)
tree40b02dead6acdcaab9cc15efc9ae4710c2ed78a8 /db/migrate/20191106150931_add_timelog_spent_at_index.rb
parent97d4d926630822d0e1a638206909679c962d2f0a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20191106150931_add_timelog_spent_at_index.rb')
-rw-r--r--db/migrate/20191106150931_add_timelog_spent_at_index.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20191106150931_add_timelog_spent_at_index.rb b/db/migrate/20191106150931_add_timelog_spent_at_index.rb
new file mode 100644
index 00000000000..2412b77d0bf
--- /dev/null
+++ b/db/migrate/20191106150931_add_timelog_spent_at_index.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddTimelogSpentAtIndex < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :timelogs, :spent_at, where: 'spent_at IS NOT NULL'
+ end
+
+ def down
+ remove_concurrent_index :timelogs, :spent_at, where: 'spent_at IS NOT NULL'
+ end
+end