1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 class AddExpressionIndexToLinks < ActiveRecord::Migration[4.2]
7 ActiveRecord::Base.connection.execute 'CREATE INDEX index_links_on_substring_head_uuid on links (substring(head_uuid, 7, 5))'
8 ActiveRecord::Base.connection.execute 'CREATE INDEX index_links_on_substring_tail_uuid on links (substring(tail_uuid, 7, 5))'
12 ActiveRecord::Base.connection.execute 'DROP INDEX index_links_on_substring_head_uuid'
13 ActiveRecord::Base.connection.execute 'DROP INDEX index_links_on_substring_tail_uuid'