Merge branch '15133-remove-jobs-api' refs #15133
[arvados.git] / services / api / db / migrate / 20180824155207_add_queue_index_to_containers.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AddQueueIndexToContainers < ActiveRecord::Migration[4.2]
6   def up
7     ActiveRecord::Base.connection.execute 'CREATE INDEX index_containers_on_queued_state on containers (state, (priority > 0))'
8   end
9   def down
10     ActiveRecord::Base.connection.execute 'DROP INDEX index_containers_on_queued_state'
11   end
12 end