Files
nairobi/db/migrate/20170125114952_add_answer_id_to_poll_voters.rb
Juanjo Bazán 5806d86e33 changes poll_voters to optionally reference an answer
adds indexes for poll_voters
2017-01-25 12:57:00 +01:00

10 lines
320 B
Ruby

class AddAnswerIdToPollVoters < ActiveRecord::Migration
def change
add_column :poll_voters, :answer_id, :integer, default: nil
add_index :poll_voters, :document_number
add_index :poll_voters, :poll_id
add_index :poll_voters, [:poll_id, :document_number, :document_type], name: 'doc_by_poll'
end
end