docbrown/db/migrate/20190525233909_create_polls.rb
Ben Halpern 8ae057b06e
Beta polls feature (admin use only for now) (#3176)
* Initial poll features

* Add basic poll functionality

* Finish (maybe) beta poll functionality
2019-06-15 17:33:30 -04:00

14 lines
458 B
Ruby

class CreatePolls < ActiveRecord::Migration[5.2]
def change
create_table :polls do |t|
t.bigint :article_id
t.string :prompt_markdown
t.string :prompt_html
t.boolean :allow_multiple_selections, default: false
t.integer :poll_options_count, null: false, default: 0
t.integer :poll_votes_count, null: false, default: 0
t.integer :poll_skips_count, null: false, default: 0
t.timestamps
end
end
end