diff --git a/db/migrate/20211020104237_add_champs_etablissement_id_index.rb b/db/migrate/20211020104237_add_champs_etablissement_id_index.rb new file mode 100644 index 000000000..444fdb405 --- /dev/null +++ b/db/migrate/20211020104237_add_champs_etablissement_id_index.rb @@ -0,0 +1,7 @@ +class AddChampsEtablissementIdIndex < ActiveRecord::Migration[6.1] + disable_ddl_transaction! + + def change + add_index :champs, :etablissement_id, algorithm: :concurrently + end +end diff --git a/db/schema.rb b/db/schema.rb index 219a263a8..b8c245f1c 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_10_12_100819) do +ActiveRecord::Schema.define(version: 2021_10_20_104237) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -191,6 +191,7 @@ ActiveRecord::Schema.define(version: 2021_10_12_100819) do t.string "fetch_external_data_exceptions", array: true t.jsonb "value_json" t.index ["dossier_id"], name: "index_champs_on_dossier_id" + t.index ["etablissement_id"], name: "index_champs_on_etablissement_id" t.index ["parent_id"], name: "index_champs_on_parent_id" t.index ["private"], name: "index_champs_on_private" t.index ["row"], name: "index_champs_on_row"