Retrospring/db/migrate/20141130180152_rename_colum...

8 lines
245 B
Ruby
Raw Normal View History

2014-11-30 10:43:22 -08:00
class RenameColumnsInAnswers < ActiveRecord::Migration
def change
rename_column :answers, :comments, :comment_count
remove_column :answers, :likes
change_column :answers, :comment_count, :integer, default: 0, null: false
end
end