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

7 lines
241 B
Ruby

class AddPolymorphismToComments < ActiveRecord::Migration
def change
add_column :comments, :commentable_id, :integer
add_column :comments, :commentable_type, :string
add_column :comments, :score, :integer, default: 0
end
end