amelioration(dossier.indexes): lors de sa suppression, un dossier nullifie les autre parent_dossier_id ayant son id. ça fait que la suppression des dossiers [ds le cas des expires] est LENT [3s pr executer la requete de nullification en dev]
This commit is contained in:
parent
61d620c280
commit
5f8fce7997
2 changed files with 9 additions and 1 deletions
|
@ -0,0 +1,7 @@
|
||||||
|
class AddIndexToParentDossierId < ActiveRecord::Migration[7.0]
|
||||||
|
disable_ddl_transaction!
|
||||||
|
|
||||||
|
def change
|
||||||
|
add_index :dossiers, :parent_dossier_id, algorithm: :concurrently
|
||||||
|
end
|
||||||
|
end
|
|
@ -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[7.0].define(version: 2023_06_21_161733) do
|
ActiveRecord::Schema[7.0].define(version: 2023_06_23_160831) 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"
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
@ -416,6 +416,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_06_21_161733) do
|
||||||
t.index ["editing_fork_origin_id"], name: "index_dossiers_on_editing_fork_origin_id"
|
t.index ["editing_fork_origin_id"], name: "index_dossiers_on_editing_fork_origin_id"
|
||||||
t.index ["groupe_instructeur_id"], name: "index_dossiers_on_groupe_instructeur_id"
|
t.index ["groupe_instructeur_id"], name: "index_dossiers_on_groupe_instructeur_id"
|
||||||
t.index ["hidden_at"], name: "index_dossiers_on_hidden_at"
|
t.index ["hidden_at"], name: "index_dossiers_on_hidden_at"
|
||||||
|
t.index ["parent_dossier_id"], name: "index_dossiers_on_parent_dossier_id"
|
||||||
t.index ["prefill_token"], name: "index_dossiers_on_prefill_token", unique: true
|
t.index ["prefill_token"], name: "index_dossiers_on_prefill_token", unique: true
|
||||||
t.index ["revision_id"], name: "index_dossiers_on_revision_id"
|
t.index ["revision_id"], name: "index_dossiers_on_revision_id"
|
||||||
t.index ["state"], name: "index_dossiers_on_state"
|
t.index ["state"], name: "index_dossiers_on_state"
|
||||||
|
|
Loading…
Add table
Reference in a new issue