1 class UpdateUserPostCounts < ActiveRecord::Migration
3 # old and not needed, we only need to know post count
4 remove_column "users", "topics_count"
5 # because i think the counts have been off
6 User.find(:all).each do | i |
7 i.posts_count=i.posts.count
13 raise IrreversibleMigration