Add uniqueness validation to document_number and document_type pair

This commit is contained in:
Senén Rodero Rodríguez
2019-05-30 11:16:33 +02:00
committed by Javi Martín
parent d1587ecc62
commit 3c39dccad4
4 changed files with 19 additions and 0 deletions

View File

@@ -978,6 +978,7 @@ ActiveRecord::Schema.define(version: 20190607160900) do
t.string "postal_code", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["document_number", "document_type"], name: "index_local_census_records_on_document_number_and_document_type", unique: true, using: :btree
t.index ["document_number"], name: "index_local_census_records_on_document_number", using: :btree
end