2015-01-08 12:00:43 +08:00
|
|
|
class CreatePollVotes < ActiveRecord::Migration
|
2015-01-08 17:42:46 +08:00
|
|
|
def up
|
2015-01-08 12:00:43 +08:00
|
|
|
create_table :poll_votes do |t|
|
|
|
|
t.integer :user_id
|
2015-01-08 17:42:46 +08:00
|
|
|
t.integer :poll_question_id
|
|
|
|
t.integer :poll_answer_id
|
2015-01-08 12:00:43 +08:00
|
|
|
t.text :vote_text
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
end
|
2015-01-08 17:42:46 +08:00
|
|
|
|
|
|
|
def down
|
|
|
|
drop_table :poll_votes
|
|
|
|
end
|
2015-01-08 12:00:43 +08:00
|
|
|
end
|