X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a002d3ef4bdf5f9ca4b1bd79c000cf695dc59d8b..35bc168c5a98dbe3b97c4b3179b4834b78a5b72c:/services/api/db/migrate/20150216193428_collection_name_owner_unique_only_non_expired.rb?ds=sidebyside diff --git a/services/api/db/migrate/20150216193428_collection_name_owner_unique_only_non_expired.rb b/services/api/db/migrate/20150216193428_collection_name_owner_unique_only_non_expired.rb index 92856882d4..6e581883c5 100644 --- a/services/api/db/migrate/20150216193428_collection_name_owner_unique_only_non_expired.rb +++ b/services/api/db/migrate/20150216193428_collection_name_owner_unique_only_non_expired.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class CollectionNameOwnerUniqueOnlyNonExpired < ActiveRecord::Migration def find_index indexes = ActiveRecord::Base.connection.indexes('collections') @@ -17,8 +21,7 @@ class CollectionNameOwnerUniqueOnlyNonExpired < ActiveRecord::Migration def down # it failed during up. is it going to pass now? should we do nothing? remove_index :collections, :name => 'collection_owner_uuid_name_unique' if !find_index.empty? - # and this is failing ... - # add_index(:collections, [:owner_uuid, :name], unique: true, - # name: 'collection_owner_uuid_name_unique') + add_index(:collections, [:owner_uuid, :name], unique: true, + name: 'collection_owner_uuid_name_unique') end end