adds poll_id and stats fields to poll_voters

This commit is contained in:
Juanjo Bazán
2017-01-25 12:03:48 +01:00
parent 480f92bdd9
commit 900563e31c
3 changed files with 21 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
class AddPollIdAndStatsFieldsToPollVoter < ActiveRecord::Migration
def change
add_column :poll_voters, :poll_id, :integer, null: false
remove_column :poll_voters, :booth_assignment_id, :integer, null: false
add_column :poll_voters, :booth_assignment_id, :integer
add_column :poll_voters, :age, :integer
add_column :poll_voters, :gender, :string
add_column :poll_voters, :geozone_id, :integer
end
end