diff options
Diffstat (limited to 'db/migrate/20150306023112_add_unique_index_to_namespace.rb')
-rw-r--r-- | db/migrate/20150306023112_add_unique_index_to_namespace.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20150306023112_add_unique_index_to_namespace.rb b/db/migrate/20150306023112_add_unique_index_to_namespace.rb index b1f7822b4dc..6472138e3ef 100644 --- a/db/migrate/20150306023112_add_unique_index_to_namespace.rb +++ b/db/migrate/20150306023112_add_unique_index_to_namespace.rb @@ -1,7 +1,7 @@ class AddUniqueIndexToNamespace < ActiveRecord::Migration def change - remove_index :namespaces, :name - remove_index :namespaces, :path + remove_index :namespaces, column: :name if index_exists?(:namespaces, :name) + remove_index :namespaces, column: :path if index_exists?(:namespaces, :path) add_index :namespaces, :name, unique: true add_index :namespaces, :path, unique: true |