Skip to content

Instantly share code, notes, and snippets.

@rodloboz
Last active April 27, 2019 00:53
Show Gist options
  • Save rodloboz/26342c2c3c8d6cd66f064caac1f7b733 to your computer and use it in GitHub Desktop.
Save rodloboz/26342c2c3c8d6cd66f064caac1f7b733 to your computer and use it in GitHub Desktop.
class AddFollowCountersToUsers < ActiveRecord::Migration[6.0]
def change
add_column :users, :followers_count, :integer, null: false, default: 0
add_column :users, :followings_count, :integer, null: false, default: 0
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment