Merge branch '12690-12748-crunchstat-summary'
[arvados.git] / services / api / db / migrate / 20180824152014_add_md5_index_to_containers.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AddMd5IndexToContainers < ActiveRecord::Migration
6   def up
7     ActiveRecord::Base.connection.execute 'CREATE INDEX index_containers_on_reuse_columns on containers (md5(command), cwd, md5(environment), output_path, container_image, md5(mounts), secret_mounts_md5, md5(runtime_constraints))'
8   end
9   def down
10     ActiveRecord::Base.connection.execute 'DROP INDEX index_containers_on_reuse_columns'
11   end
12 end