From cee087a7943f913669bd5e8dba22b57fcac4ff4e Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Tue, 22 Nov 2022 13:59:03 +0100 Subject: [PATCH] add libelle index on procedures --- .../20221122123809_add_libelle_index_to_procedures.rb | 7 +++++++ db/schema.rb | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20221122123809_add_libelle_index_to_procedures.rb diff --git a/db/migrate/20221122123809_add_libelle_index_to_procedures.rb b/db/migrate/20221122123809_add_libelle_index_to_procedures.rb new file mode 100644 index 000000000..33ab34d24 --- /dev/null +++ b/db/migrate/20221122123809_add_libelle_index_to_procedures.rb @@ -0,0 +1,7 @@ +class AddLibelleIndexToProcedures < ActiveRecord::Migration[6.1] + disable_ddl_transaction! + + def change + add_index :procedures, :libelle, algorithm: :concurrently + end +end diff --git a/db/schema.rb b/db/schema.rb index d0fdead37..a43348a62 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: 2022_11_10_100759) do +ActiveRecord::Schema.define(version: 2022_11_22_123809) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" @@ -679,6 +679,7 @@ ActiveRecord::Schema.define(version: 2022_11_10_100759) do t.index ["declarative_with_state"], name: "index_procedures_on_declarative_with_state" t.index ["draft_revision_id"], name: "index_procedures_on_draft_revision_id" t.index ["hidden_at"], name: "index_procedures_on_hidden_at" + t.index ["libelle"], name: "index_procedures_on_libelle" t.index ["parent_procedure_id"], name: "index_procedures_on_parent_procedure_id" t.index ["path", "closed_at", "hidden_at", "unpublished_at"], name: "procedure_path_uniqueness", unique: true t.index ["path", "closed_at", "hidden_at"], name: "index_procedures_on_path_and_closed_at_and_hidden_at", unique: true