Remove duplicate indexes from database (#32454)

This commit is contained in:
Matt Jankowski 2024-10-23 09:26:51 -04:00 committed by GitHub
parent c3e684b715
commit fae1de699c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 5 deletions

View file

@ -0,0 +1,10 @@
# frozen_string_literal: true
class RemoveDuplicateIndexes < ActiveRecord::Migration[7.1]
def change
remove_index :account_aliases, :account_id
remove_index :account_relationship_severance_events, :account_id
remove_index :custom_filter_statuses, :status_id
remove_index :webauthn_credentials, :user_id
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2024_10_07_071624) do
ActiveRecord::Schema[7.1].define(version: 2024_10_14_010506) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -21,7 +21,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_10_07_071624) do
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["account_id", "uri"], name: "index_account_aliases_on_account_id_and_uri", unique: true
t.index ["account_id"], name: "index_account_aliases_on_account_id"
end
create_table "account_conversations", force: :cascade do |t|
@ -99,7 +98,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_10_07_071624) do
t.integer "followers_count", default: 0, null: false
t.integer "following_count", default: 0, null: false
t.index ["account_id", "relationship_severance_event_id"], name: "idx_on_account_id_relationship_severance_event_id_7bd82bf20e", unique: true
t.index ["account_id"], name: "index_account_relationship_severance_events_on_account_id"
t.index ["relationship_severance_event_id"], name: "idx_on_relationship_severance_event_id_403f53e707"
end
@ -397,7 +395,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_10_07_071624) do
t.datetime "updated_at", null: false
t.index ["custom_filter_id"], name: "index_custom_filter_statuses_on_custom_filter_id"
t.index ["status_id", "custom_filter_id"], name: "index_custom_filter_statuses_on_status_id_and_custom_filter_id", unique: true
t.index ["status_id"], name: "index_custom_filter_statuses_on_status_id"
end
create_table "custom_filters", force: :cascade do |t|
@ -1202,7 +1199,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_10_07_071624) do
t.datetime "updated_at", precision: nil, null: false
t.index ["external_id"], name: "index_webauthn_credentials_on_external_id", unique: true
t.index ["user_id", "nickname"], name: "index_webauthn_credentials_on_user_id_and_nickname", unique: true
t.index ["user_id"], name: "index_webauthn_credentials_on_user_id"
end
create_table "webhooks", force: :cascade do |t|