class AddEvenMoreIndices < ActiveRecord::Migration[5.2]
  def change
    add_index(:users, [:deleted_at, :username])

    add_index(:universes, [:deleted_at, :id])
    add_index(:characters, [:deleted_at, :id])
    add_index(:locations, [:deleted_at, :id])
    add_index(:items, [:deleted_at, :id])
    add_index(:countries, [:deleted_at, :id])
    add_index(:creatures, [:deleted_at, :id])
    add_index(:deities, [:deleted_at, :id])
    add_index(:floras, [:deleted_at, :id])
    add_index(:governments, [:deleted_at, :id])
    add_index(:groups, [:deleted_at, :id])
    add_index(:landmarks, [:deleted_at, :id])
    add_index(:languages, [:deleted_at, :id])
    add_index(:magics, [:deleted_at, :id])
    add_index(:planets, [:deleted_at, :id])
    add_index(:races, [:deleted_at, :id])
    add_index(:religions, [:deleted_at, :id])
    add_index(:scenes, [:deleted_at, :id])
    add_index(:technologies, [:deleted_at, :id])
    add_index(:towns, [:deleted_at, :id])

    add_index(:universes, [:deleted_at, :user_id])
    add_index(:characters, [:deleted_at, :user_id])
    add_index(:locations, [:deleted_at, :user_id])
    add_index(:items, [:deleted_at, :user_id])
    add_index(:countries, [:deleted_at, :user_id])
    add_index(:creatures, [:deleted_at, :user_id])
    add_index(:deities, [:deleted_at, :user_id])
    add_index(:floras, [:deleted_at, :user_id])
    add_index(:governments, [:deleted_at, :user_id])
    add_index(:groups, [:deleted_at, :user_id])
    add_index(:landmarks, [:deleted_at, :user_id])
    add_index(:languages, [:deleted_at, :user_id])
    add_index(:magics, [:deleted_at, :user_id])
    add_index(:planets, [:deleted_at, :user_id])
    add_index(:races, [:deleted_at, :user_id])
    add_index(:religions, [:deleted_at, :user_id])
    add_index(:scenes, [:deleted_at, :user_id])
    add_index(:technologies, [:deleted_at, :user_id])
    add_index(:towns, [:deleted_at, :user_id])

    add_index(:characters, [:deleted_at, :universe_id])
    add_index(:locations, [:deleted_at, :universe_id])
    add_index(:items, [:deleted_at, :universe_id])
    add_index(:countries, [:deleted_at, :universe_id])
    add_index(:creatures, [:deleted_at, :universe_id])
    add_index(:deities, [:deleted_at, :universe_id])
    add_index(:floras, [:deleted_at, :universe_id])
    add_index(:governments, [:deleted_at, :universe_id])
    add_index(:groups, [:deleted_at, :universe_id])
    add_index(:landmarks, [:deleted_at, :universe_id])
    add_index(:languages, [:deleted_at, :universe_id])
    add_index(:magics, [:deleted_at, :universe_id])
    add_index(:planets, [:deleted_at, :universe_id])
    add_index(:races, [:deleted_at, :universe_id])
    add_index(:religions, [:deleted_at, :universe_id])
    add_index(:scenes, [:deleted_at, :universe_id])
    add_index(:technologies, [:deleted_at, :universe_id])
    add_index(:towns, [:deleted_at, :universe_id])

    add_index(:attribute_fields, [:deleted_at, :name])
  end
end
