retrospring/db/migrate/20141130180152_rename_columns_in_answers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
281 B
Ruby
Raw Normal View History

2023-10-20 01:37:34 +02:00
# frozen_string_literal: true
class RenameColumnsInAnswers < ActiveRecord::Migration[4.2]
2014-11-30 19:43:22 +01:00
def change
rename_column :answers, :comments, :comment_count
remove_column :answers, :likes
change_column :answers, :comment_count, :integer, default: 0, null: false
end
end