From 368b4abfcf67400fb446febff8cbc9f8f290ddc2 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 13 Aug 2026 08:26:20 +0000 Subject: [PATCH] Remove redundant index `index_keypairs_on_account_id` (#40138) --- ...20260812154114_remove_index_keypairs_on_account_id.rb | 9 +++++++++ db/schema.rb | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20260812154114_remove_index_keypairs_on_account_id.rb diff --git a/db/migrate/20260812154114_remove_index_keypairs_on_account_id.rb b/db/migrate/20260812154114_remove_index_keypairs_on_account_id.rb new file mode 100644 index 00000000000..c8090f57e3f --- /dev/null +++ b/db/migrate/20260812154114_remove_index_keypairs_on_account_id.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class RemoveIndexKeypairsOnAccountId < ActiveRecord::Migration[8.1] + disable_ddl_transaction! + + def change + remove_index :keypairs, :account_id, algorithm: :concurrently + end +end diff --git a/db/schema.rb b/db/schema.rb index af612111fcc..579bff9dd37 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[8.1].define(version: 2026_08_05_130216) do +ActiveRecord::Schema[8.1].define(version: 2026_08_12_154114) do # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" @@ -728,7 +728,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_08_05_130216) do t.datetime "updated_at", null: false t.string "uri" t.index ["account_id", "local_fragment"], name: "index_keypairs_on_account_id_and_local_fragment", unique: true - t.index ["account_id"], name: "index_keypairs_on_account_id" t.index ["uri"], name: "index_keypairs_on_uri", unique: true end