refactor(repetition): use row_id instead of row
This commit is contained in:
parent
8adada9857
commit
af33d5d65c
17 changed files with 47 additions and 36 deletions
5
db/migrate/20230110181415_remove_champs_row_index.rb
Normal file
5
db/migrate/20230110181415_remove_champs_row_index.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class RemoveChampsRowIndex < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
remove_index :champs, name: "index_champs_on_type_de_champ_id_and_dossier_id_and_row"
|
||||
end
|
||||
end
|
7
db/migrate/20230110181426_add_champs_row_id_index.rb
Normal file
7
db/migrate/20230110181426_add_champs_row_id_index.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
class AddChampsRowIdIndex < ActiveRecord::Migration[6.1]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_index :champs, [:type_de_champ_id, :dossier_id, :row_id], unique: true, algorithm: :concurrently
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2023_01_09_140138) do
|
||||
ActiveRecord::Schema.define(version: 2023_01_10_181426) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
|
@ -240,7 +240,7 @@ ActiveRecord::Schema.define(version: 2023_01_09_140138) do
|
|||
t.index ["row"], name: "index_champs_on_row"
|
||||
t.index ["row_id"], name: "index_champs_on_row_id"
|
||||
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_id"], name: "index_champs_on_type_de_champ_id_and_dossier_id_and_row_id", unique: true
|
||||
t.index ["type_de_champ_id"], name: "index_champs_on_type_de_champ_id"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue