Remove overeager unique index (#38414)

This commit is contained in:
David Roetzel
2026-03-26 14:29:47 +01:00
committed by GitHub
parent 39ad873589
commit 35c30dfc6e
2 changed files with 8 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
class RemoveUniqueIndexOnCollectionItemObjectUris < ActiveRecord::Migration[8.1]
def change
remove_index :collection_items, :object_uri, unique: true, where: '(activity_uri IS NOT NULL)'
end
end

View File

@@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.1].define(version: 2026_03_25_151755) do ActiveRecord::Schema[8.1].define(version: 2026_03_26_112324) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "pg_catalog.plpgsql" enable_extension "pg_catalog.plpgsql"
@@ -373,7 +373,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_03_25_151755) do
t.index ["account_id"], name: "index_collection_items_on_account_id" t.index ["account_id"], name: "index_collection_items_on_account_id"
t.index ["approval_uri"], name: "index_collection_items_on_approval_uri", unique: true, where: "(approval_uri IS NOT NULL)" t.index ["approval_uri"], name: "index_collection_items_on_approval_uri", unique: true, where: "(approval_uri IS NOT NULL)"
t.index ["collection_id"], name: "index_collection_items_on_collection_id" t.index ["collection_id"], name: "index_collection_items_on_collection_id"
t.index ["object_uri"], name: "index_collection_items_on_object_uri", unique: true, where: "(activity_uri IS NOT NULL)"
t.index ["uri"], name: "index_collection_items_on_uri", unique: true, where: "(uri IS NOT NULL)" t.index ["uri"], name: "index_collection_items_on_uri", unique: true, where: "(uri IS NOT NULL)"
end end