diff --git a/db/migrate/20210416160721_add_index_to_exercice_etablissement_id.rb b/db/migrate/20210416160721_add_index_to_exercice_etablissement_id.rb new file mode 100644 index 000000000..724a98979 --- /dev/null +++ b/db/migrate/20210416160721_add_index_to_exercice_etablissement_id.rb @@ -0,0 +1,5 @@ +class AddIndexToExerciceEtablissementId < ActiveRecord::Migration[6.1] + def change + add_index :exercices, :etablissement_id + end +end diff --git a/db/schema.rb b/db/schema.rb index d74b65981..c282337f9 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.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|