chore(db): add index on type to champs

This commit is contained in:
Paul Chavard 2022-10-07 15:17:31 +02:00
parent e4fa37ed27
commit bc5e46e6de
2 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,7 @@
class AddIndexOnTypeToChamps < ActiveRecord::Migration[6.1]
include Database::MigrationHelpers
disable_ddl_transaction!
def up
add_concurrent_index :champs, [:type]
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: 2022_10_06_193737) do ActiveRecord::Schema.define(version: 2022_10_07_113737) 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 "pgcrypto" enable_extension "pgcrypto"
@ -203,6 +203,7 @@ ActiveRecord::Schema.define(version: 2022_10_06_193737) do
t.index ["parent_id"], name: "index_champs_on_parent_id" t.index ["parent_id"], name: "index_champs_on_parent_id"
t.index ["private"], name: "index_champs_on_private" t.index ["private"], name: "index_champs_on_private"
t.index ["row"], name: "index_champs_on_row" t.index ["row"], name: "index_champs_on_row"
t.index ["type"], name: "index_champs_on_type"
t.index ["type_de_champ_id", "dossier_id", "row"], name: "index_champs_on_type_de_champ_id_and_dossier_id_and_row", unique: true t.index ["type_de_champ_id", "dossier_id", "row"], name: "index_champs_on_type_de_champ_id_and_dossier_id_and_row", unique: true
t.index ["type_de_champ_id"], name: "index_champs_on_type_de_champ_id" t.index ["type_de_champ_id"], name: "index_champs_on_type_de_champ_id"
end end