Add unique index to Experts Procedures on expert <> procedure ids
This commit is contained in:
parent
b39d9d41f0
commit
f280820201
2 changed files with 7 additions and 1 deletions
|
@ -0,0 +1,5 @@
|
|||
class AddUniqueIndexToExpertsProcedures < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_index :experts_procedures, [:expert_id, :procedure_id], unique: true
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2021_01_20_084256) do
|
||||
ActiveRecord::Schema.define(version: 2021_01_21_134435) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -334,6 +334,7 @@ ActiveRecord::Schema.define(version: 2021_01_20_084256) do
|
|||
t.boolean "allow_decision_access", default: false, null: false
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.index ["expert_id", "procedure_id"], name: "index_experts_procedures_on_expert_id_and_procedure_id", unique: true
|
||||
t.index ["expert_id"], name: "index_experts_procedures_on_expert_id"
|
||||
t.index ["procedure_id"], name: "index_experts_procedures_on_procedure_id"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue