Sha256: a301cec03c7957d881db5ce2b4fec0ccec0e1705a00ff6729346eba1bca3f04d
Contents?: true
Size: 336 Bytes
Versions: 32
Compression:
Stored size: 336 Bytes
Contents
class AddImagesCountToUsers < ActiveRecord::Migration def self.up add_column :users, :images_count, :integer, :default => 0 # User.reset_column_information # User.all.each do |u| # u.update_attribute :images_count, u.images.length # end end def self.down remove_column :users, :images_count end end
Version data entries
32 entries across 32 versions & 1 rubygems