Remove duplicate indexes in lists (#5990)

lolsob-rspec
abcang 2017-12-13 01:38:42 +09:00 committed by Eugen Rochko
parent d67575edea
commit a40aff8dbc
2 changed files with 7 additions and 3 deletions

View File

@ -0,0 +1,6 @@
class RemoveDuplicateIndexesInLists < ActiveRecord::Migration[5.1]
def change
remove_index :list_accounts, name: "index_list_accounts_on_account_id"
remove_index :list_accounts, name: "index_list_accounts_on_list_id"
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.define(version: 20171201000000) do ActiveRecord::Schema.define(version: 20171212195226) 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 "plpgsql" enable_extension "plpgsql"
@ -202,10 +202,8 @@ ActiveRecord::Schema.define(version: 20171201000000) do
t.bigint "account_id", null: false t.bigint "account_id", null: false
t.bigint "follow_id", null: false t.bigint "follow_id", null: false
t.index ["account_id", "list_id"], name: "index_list_accounts_on_account_id_and_list_id", unique: true t.index ["account_id", "list_id"], name: "index_list_accounts_on_account_id_and_list_id", unique: true
t.index ["account_id"], name: "index_list_accounts_on_account_id"
t.index ["follow_id"], name: "index_list_accounts_on_follow_id" t.index ["follow_id"], name: "index_list_accounts_on_follow_id"
t.index ["list_id", "account_id"], name: "index_list_accounts_on_list_id_and_account_id" t.index ["list_id", "account_id"], name: "index_list_accounts_on_list_id_and_account_id"
t.index ["list_id"], name: "index_list_accounts_on_list_id"
end end
create_table "lists", force: :cascade do |t| create_table "lists", force: :cascade do |t|