Merge branch '8784-dir-listings'
[arvados.git] / services / api / db / migrate / 20130612042554_add_name_unique_index_to_repositories.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AddNameUniqueIndexToRepositories < ActiveRecord::Migration
6   def up
7     remove_index :repositories, :name
8     add_index :repositories, :name, :unique => true
9   end
10
11   def down
12     remove_index :repositories, :name
13     add_index :repositories, :name
14   end
15 end