14008: Merge branch 'master' into 14008-containers-index
[arvados.git] / services / api / db / migrate / 20180820132617_add_lock_index_to_containers.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AddLockIndexToContainers < ActiveRecord::Migration
6   def change
7     # For the current code in sdk/go/dispatch:
8     add_index :containers, [:locked_by_uuid, :priority]
9     # For future dispatchers that use filters instead of offset for
10     # more predictable paging:
11     add_index :containers, [:locked_by_uuid, :uuid]
12   end
13 end