Merge pull request #8590 from demarches-simplifiees/add-external-id-index

add external id index to champs
This commit is contained in:
mfo 2023-02-07 15:28:18 +01:00 committed by GitHub
commit b1440ac5ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,13 @@
class AddExternalIdIndexToChamps < ActiveRecord::Migration[6.1]
include Database::MigrationHelpers
disable_ddl_transaction!
def up
add_concurrent_index :champs, :external_id
end
def down
remove_index :champs, column: :external_id
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2023_02_03_134127) do
ActiveRecord::Schema.define(version: 2023_02_07_105539) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
@ -233,6 +233,7 @@ ActiveRecord::Schema.define(version: 2023_02_03_134127) do
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 ["external_id"], name: "index_champs_on_external_id"
t.index ["parent_id"], name: "index_champs_on_parent_id"
t.index ["private"], name: "index_champs_on_private"
t.index ["row_id"], name: "index_champs_on_row_id"