docbrown/db/migrate/20190611195955_create_poll_skips.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

12 lines
301 B
Ruby

class CreatePollSkips < ActiveRecord::Migration[5.2]
def change
create_table :poll_skips do |t|
t.bigint :user_id
t.bigint :poll_id
t.timestamps
end
add_index :poll_skips, %i[poll_id user_id],
unique: true,
name: "index_poll_skips_on_poll_and_user"
end
end