retrospring/db/migrate/20141130180152_rename_columns_in_answers.rb
2020-04-19 18:10:31 +02:00

7 lines
250 B
Ruby

class RenameColumnsInAnswers < ActiveRecord::Migration[4.2]
def change
rename_column :answers, :comments, :comment_count
remove_column :answers, :likes
change_column :answers, :comment_count, :integer, default: 0, null: false
end
end