Merge branch '8784-dir-listings'
[arvados.git] / services / api / db / migrate / 20130207195855_add_index_on_timestamps.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AddIndexOnTimestamps < ActiveRecord::Migration
6   def tables
7     %w{api_clients collections jobs job_steps links logs nodes pipeline_invocations pipelines projects specimens users}
8   end
9
10   def change
11     tables.each do |t|
12       add_index t.to_sym, :created_at
13       add_index t.to_sym, :modified_at
14     end
15   end
16 end