Add missing etablissement_id index on exercices table (-600ms)

This commit is contained in:
simon lehericey 2021-04-16 18:11:55 +02:00
parent 6b08de77e3
commit f542c0876e
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,5 @@
class AddIndexToExerciceEtablissementId < ActiveRecord::Migration[6.1]
def change
add_index :exercices, :etablissement_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.define(version: 2021_04_16_074049) do
ActiveRecord::Schema.define(version: 2021_04_16_160721) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -325,6 +325,7 @@ ActiveRecord::Schema.define(version: 2021_04_16_074049) do
t.datetime "date_fin_exercice"
t.datetime "created_at"
t.datetime "updated_at"
t.index ["etablissement_id"], name: "index_exercices_on_etablissement_id"
end
create_table "experts", force: :cascade do |t|