Retrospring/db/migrate/20141102153520_add_counts_t...

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

12 lines
474 B
Ruby
Raw Normal View History

2023-10-19 16:37:34 -07:00
# frozen_string_literal: true
class AddCountsToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :friend_count, :integer, default: 0, null: false
add_column :users, :follower_count, :integer, default: 0, null: false
add_column :users, :asked_count, :integer, default: 0, null: false
add_column :users, :answered_count, :integer, default: 0, null: false
add_column :users, :commented_count, :integer, default: 0, null: false
end
end