docbrown/db/migrate/20160926164412_create_reactions.rb
2018-02-28 16:11:08 -05:00

13 lines
335 B
Ruby

class CreateReactions < ActiveRecord::Migration
def change
create_table :reactions do |t|
t.integer :user_id
t.integer :reactable_id
t.string :reactable_type
t.string :category
t.float :points, default: 1.0
t.timestamps null: false
end
add_index("reactions", "user_id")
end
end