Add index to local census records document_number

This will speed up searching by document_number
This commit is contained in:
Senén Rodero Rodríguez
2019-05-09 10:57:27 +02:00
committed by Javi Martín
parent c72f4bfabf
commit c4ef33e6f8
2 changed files with 6 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
class AddIndexToLocalCensusRecordsDocumentNumber < ActiveRecord::Migration[5.0]
def change
add_index :local_census_records, :document_number
end
end

View File

@@ -978,6 +978,7 @@ ActiveRecord::Schema.define(version: 20190607160900) do
t.string "postal_code", null: false t.string "postal_code", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["document_number"], name: "index_local_census_records_on_document_number", using: :btree
end end
create_table "locks", force: :cascade do |t| create_table "locks", force: :cascade do |t|