summaryrefslogtreecommitdiff
path: root/db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb')
-rw-r--r--db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb b/db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb
index c2e62dede8a..81bf0d94e11 100644
--- a/db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb
+++ b/db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb
@@ -9,7 +9,7 @@ class AddPartialIndexToScheduledAt < ActiveRecord::Migration
disable_ddl_transaction!
def up
- add_concurrent_index(:ci_builds, [:scheduled_at, :id], where: "scheduled_at IS NOT NULL", name: INDEX_NAME)
+ add_concurrent_index(:ci_builds, :scheduled_at, where: "scheduled_at IS NOT NULL AND type = 'Ci::Build' AND status = 'scheduled'", name: INDEX_NAME)
end
def down