mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Remove overeager unique index (#38414)
This commit is contained in:
@@ -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
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user